Add code snippets for front matter
yajo opened this issue · comments
I guess being able to inject YAML/TOML front matter would be great.
At least I have this useful snippet in my blog:
{
"date": {
"prefix": "date",
"body": "$CURRENT_YEAR-$CURRENT_MONTH-${CURRENT_DATE}T$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
}
}
it helps a lot! I guess there could be more, like a full one with page title, slug, date, tags, draft true/false, etc...
Hey, @yajo This is handled already by Hugo archetypes, which can be easily customized for the need.
Yes, but if I start making a post and then days later I want to update its date to publish it, archetypes don't work for that, and updating the date in this format by hand is a little bit costly, while with the snippet is pretty fast.
OTOH for the default front matter it works great, thanks for the tip!
Ehmm so you aren't going to add the snippet? Want me to do the PR? 🙄
Yes, you're totally welcome to submit a PR