Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tags and categories for pages & collections #161

Closed
noraj opened this issue Oct 17, 2020 · 5 comments
Closed

feat: tags and categories for pages & collections #161

noraj opened this issue Oct 17, 2020 · 5 comments

Comments

@noraj
Copy link

noraj commented Oct 17, 2020

Summary

There are Predefined Variables for Posts that are not available for pages like tags and categories.

Motivation

Be able to create a doc layout based on page layout and have a documentation with tags enabled like for Mozilla, Joomla or Docker documentation (see mkdocs/mkdocs#1828 (comment)).

See an example of use case in the Why this would be a great feature? of this issue and this comment example with screenshots.

Guide-level explanation

For all staticgen either there is no tags support at all or tags are available on for posts, I never have seen one yet that have tags support for pages. Here if post already have this feature it's like for Hexo, it shouldn't be difficult to enable those for pages too.

Reference-level explanation

Copy the tags & categories features from post layout to page layout.

Drawbacks

I see no reason to not doing it.

Related issue

@jaredcwhite
Copy link
Member

Thanks @noraj for posting this. I think an similar problem along these lines is categories/tags don't get picked up from custom collections either. Only posts are privileged content. But…why? 🤔

@jaredcwhite
Copy link
Member

We're going to support this eventually, but after further research it's definitely a non-trivial issue that exposes some of the weakness we inherited from our parent project (Jekyll) with regard to a robust taxonomy system. Gotta say I'm inclined to put in the extra effort to "get this right" and not just tweak things piecemeal. Stay tuned…

@noraj
Copy link
Author

noraj commented Oct 26, 2020

Yeah I heard of Jekyll tags system that is not automatic and force you to create a yml file with a whitelist of terms.

@jaredcwhite
Copy link
Member

@noraj Well it's not quite that bad 🙃… it does pick up tags automatically from front matter, but only from blog posts. That's it…no support for pages or custom collections.

@jaredcwhite jaredcwhite changed the title feat: tags and categories for pages feat: tags and categories for pages & collections Oct 26, 2020
@jaredcwhite
Copy link
Member

Will be addressed by #187, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants