3 ms·
Simply a matter of preference... It's not simply a matter of preference. While front matter isn't a part of the Commonmark spec, it is very well adopted to the
by onion2k 5y ago
Simply a matter of preference...
It's not simply a matter of preference. While front matter isn't a part of the Commonmark spec, it is very well adopted to the point where it's effectively universal across blogging apps and static site generators. You can move a markdown file from Hugo to 11ty to Gatsby to Hexo to Jekyll without changing or losing any of the content and they'll all understand your title, slug, posting date, labels, etc without any configuration or code changes necessary.
You lose that by doing something different even if you prefer an alternative approach. That's something to consider if you choose to go against the grain. It affects more than just preference.
Personally the biggest advantage I see of front matter is that it encapsulates everything about a post in one place. I don't need to update an index if I delete a post, or add one, or something.
That said, writing a script to take the index content and insert it in to the post markdown files as front matter wouldn't be very hard, just as it'd be very simple to extract front matter to your own index file, so it's not really a big deal however you choose to do things.