johnwargo / eleventy-new-post

Automates creation of a new post file in an Eleventy project
https://www.npmjs.com/package/eleventy-new-post
MIT License
5 stars 0 forks source link

Support Tags #4

Open flamedfury opened 7 months ago

flamedfury commented 7 months ago

What problem are you trying to solve with this feature? Support tags like categories

Describe the solution you'd like The same support provided for categories but for tags

Describe alternatives you've considered Populated 11ty-np.md with a tag in the front matter template to manually fill in after post has been created.

Additional context Some projects use categories, some use tags, some use both :)

johnwargo commented 7 months ago

@flamedfury I understand your need here. I set all files in my post folder to a specific tag, so I didn't consider this use case. It should be fairly easy to implement, but I'm really worried about putting too many prompts in the utility.

johnwargo commented 7 months ago

@flamedfury select only a single tag or multiple? I assume single?

flamedfury commented 7 months ago

I set all files in my post folder to a specific tag

Same, they all get tagged as "post" so I don't have to.

select only a single tag or multiple? I assume single?

Yeah, single would be fantastic, as the post tag is defaulted by the directory JSON file I am then free to select a tag, e.g. web, tech, or life and easily add any extras once the post has been drafted :)

johnwargo commented 7 months ago

OK, so you set a default then add other ones. Can you help me understand why? Why not use categories for that? Use the post tag to set the layout (like I do) and categories to group posts together?

flamedfury commented 7 months ago

I never saw a compelling use for categories, tags seem to work fine