imfing / hextra

🔯 Modern, batteries-included Hugo theme for creating beautiful doc, blog and static websites
https://imfing.github.io/hextra/
MIT License
580 stars 145 forks source link

Tags support for docs #93

Open ianchov opened 12 months ago

ianchov commented 12 months ago

Hi,

Great theme. Will you add tag support for docs?

Thanks

imfing commented 12 months ago

Thanks for the suggestion. Tags are planned for Hextra's future roadmap. Could you elaborate on how you envision using tags in docs, perhaps with examples?

ianchov commented 12 months ago

Hey thanks for the fast response. I want to use tags in a book type content (aka docs structure)

dogweather commented 5 months ago

I'm going to add specific kind of tags support: A way to automatically link docs pages to relevant blog posts:

  1. I'll set tags in docs via cascade in the Hugo config.
  2. In blog posts, I'll manually add tags when I write them.
  3. My template coding will use the .Related function in docs to link to these blog posts with matching tags.
imfing commented 5 months ago

A way to automatically link docs pages to relevant blog posts:

  1. I'll set tags in docs via cascade in the Hugo config.

Could you give some examples?

dogweather commented 5 months ago

Could you give some examples?

Sure. I have docs hierarchies for different programming languages. I create these pages with a headless CMS. So, instead of changing the markdown documents, I could do this:

cascade:
- _target:
    path: "python/**"
  tags:
  - python

(Now that I write that out, I dislike how redundant it is. Hugo might have some way match slug and tag. Or maybe I would change my CMS to output tags in the frontmatter.)