Breaking line and adding hyphen on md files

Hey guys I need to generate an MD file with this specific layout:

Screen Shot 2021-01-28 at 2.44.16 PM

  • Breaking the line and also adding a " - " before my result.

At this moment my config.yml is generating me this:
tags: My tag 1

Here’s my config.yml for the field tags:
- { label: "Tags", name: "tags", widget: "string", required: false, }

Can someone please help me? :pray:

Hey @FilipeMendes Welcome to Netlify Community!

I don’t quite understand what you are saying, can you please clearly set out where you are now and the desired outcome


Sure! I use Netlify in my blog to generate .md files as a post entry.
Each .md is a post in my blog.

My config.yml defines what fields should be on the UI and the user can create new posts.
This is the .md post that I am getting from my config.yml

But I need the tag field to be printed like this:

  - My tag 1

Breaking the line and also adding a “dash/hyphen” before the tag information.

1 Like

Hey, am I correct in saying that you are using Eleventy here. Here is a snippet from my Eleventy site where I define the tags of a post.

It may help you

  - tech
  - environment
  - politics
  - sports
1 Like

Yes!! This is what I want.
How is your config.yml look like?

Mine is looking like this:

Screen Shot 2021-01-28 at 3.10.59 PM

Here’s mine :slight_smile:

 - { label: "Tags", name: "tags", widget: "list", default: ["post"] }
1 Like

Ohhhh you’re using a list widget! Awesome, I will try and let you know.
Thanks Kyle! :slight_smile:

1 Like

It worked! Thank you, Kyle :smiley:
Do you know how to do the same for Categories?

1 Like

Should really be the same syntax.

Glad we got it working for you :grinning: