zhuochun / md-writer

✒️ Make Atom a better Markdown/AsciiDoc editor for writers and bloggers
https://atom.io/packages/markdown-writer
MIT License
341 stars 46 forks source link

Subfolder Title as FrontMatter Category #294

Closed wimmstr closed 3 years ago

wimmstr commented 5 years ago

Is your feature request related to a problem? Please describe. I organize my .md files into categories, which each have their own subfolder in /_posts. Octopress used the subfolder name to populate the "categories:" field in Frontmatter. Using "{dir}" in the frontmatter template does not work.

Describe the solution you'd like Populate the "Categories:" field in the files frontmatter with the name of its subfolder. E.g.: /_posts/example becomes "Categories: example" upon file creation.

Describe alternatives you've considered Only alternative Ive come up with is putting an empty "categories:" field in the frontmatter and fill it by hand.

zhuochun commented 5 years ago

Interesting. I have not thought about this before.

I have some questions to understand more:

zhuochun commented 3 years ago

https://github.com/zhuochun/md-writer/wiki/Settings#support-hugo-academic-theme-structure

Can give a try with {category} in file name