sukria / Dancer2-Plugin-LiteBlog

A minimalist, file-based blog engine for Dancer2. Effortlessly transform local .md and .yml files into a sleek and responsive blog without the need for a database.
GNU General Public License v3.0
3 stars 2 forks source link

Markdown with frontmatter #2

Open cromedome opened 11 months ago

cromedome commented 11 months ago

I was wondering if you considered using YAML frontmatter in Markdown before you chose to track metadata in a separate YAML file, and if so, why you opted for a separate YAML file instead. If you hadn't considered using frontmatter, @yanick has a great module for working with it (File::Serialize). I'd be happy to whip up a POC PR with it.

This is cool! Just started tinkering a bit with a revamped blog tonight.

sukria commented 11 months ago

Thanks Jason, I just wasn't aware of this option!

This is a great idea and would simplify a bit more the process of editing content for Liteblog. Definitely a good idea. I don't see yet what this would imply in terms of parsing/processing on the Perl side but I'll be happy to work with you on this PR.

Maybe, we could even implement that as an option: Liteblog could look for the meta.yml file, and if not, would expect this YAML frontmatter in the Markdown file itself. It's quite easy: everything related to that is implemented in the Article class.

cromedome commented 11 months ago

@sukria I like your approach. I got a little happy hacking time the next few days while I am traveling, I'll take a stab and get you a first draft of a PR.