DEV Community

Discussion on: How to Write Your First Post on DEV

Collapse
 
teaglebuilt profile image
dillan teagle • Edited

Hmm well i am talking about this key "description"

:
canonical_url: "https://dev.to/teaglebuilt/is-ruby-dead-17em"
collection_id: null
comments_count: 14
cover_image: null
description: ""
flare_tag: {name: "discuss", bg_color_hex: "#000000", text_color_hex: "#FFFFFF"}
id: 174966
path: "/teaglebuilt/is-ruby-dead-17em"
positive_reactions_count: 9
published_at: "2019-09-22T14:19:40.527Z"
published_timestamp: "2019-09-22T14:19:40Z"
slug: "is-ruby-dead-17em"
tag_list: (3) ["ruby", "rails", "discuss"]
title: "Is ruby dead?"
type_of: "article"
url: "https://dev.to/teaglebuilt/is-ruby-dead-17em"

curious as of how it can be filled?

Thread Thread
 
chrisachard profile image
Chris Achard

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.