DEV Community

loading...

Discussion on: How to Write Your First Post on DEV

chrisachard profile image
Chris Achard Author

Huh! Not sure actually :) @ben might know maybe? (don't know if @ mentions work here)

Thread Thread
mestrak profile image
MeStrak • Edited

I know this post is quite old but I just had the same question.

If you don't do anything then it just takes the first few lines of your article by default. If you want to set a custom description then there are two options that I could find. Option 1 seems much better to me.

Remove the ' before the --- below, I just added it before the --- to stop markdown reformatting it.

  1. Add a frontmatter section containing a description field to the top of the article (it will only be visible in edit mode):
    '---
    description: A great article about how to set the description of an article on dev.to
    '---

  2. Change the editor to basic markdown on this page: dev.to/settings/ux. When you do that new posts will have this at the top when in edit mode. However then you have other things that you need to set manually that you :
    '---
    title:
    published: false
    description:
    tags:
    //cover_image: direct_url_to_image.jpg
    '---

After setting that description field I see the custom description in the API.

Forem Open with the Forem app