hextra icon indicating copy to clipboard operation
hextra copied to clipboard

Show Taxonomies with expansion to pages in Sidebar

Open OrderdKaos opened this issue 1 year ago • 4 comments

Feature Description

As a theme user, I would like to be able to create taxonomies and have the /_default/list.html (or a /_default/terms.html) page in the theme automatically handle them by showing the Term and then open to the pages that include that Term.

Problem/Solution

The ability to support all defined taxonomies (built in and user defined) automatically.

Alternatives Considered

Creating a separate Sidebar, Creating the taxonomy in the content folder.

Additional Context

I was able to get this working, though it was an inelegant solution by:

  • overriding partials/sidebar.html
  • in the sidebar-tree section: * adding another union to $items so that {{ $items = union $items (.context.Data.Pages) }} * inside the loop adding a check for the page kind and if Term, then ranging over all implementing sub pages

Another option I was exploring was to break the sidebar-tree section out into sub-partials based on page kind and then calling based on that.

OrderdKaos avatar Aug 29 '24 17:08 OrderdKaos

just my 1c that it would indeed be nice to have better built-in taxonomies support

yarikoptic avatar Dec 20 '24 00:12 yarikoptic

In this page https://imfing.github.io/hextra/blog/markdown/, the tags are not shown. It is shown in https://imfing.github.io/hextra/blog/. It would be nice to show taxonomies in both list and single pages. Each taxonomy should be a link with a counter instead of plain text.

xuanswe avatar Mar 07 '25 22:03 xuanswe

I agree, the theme is beautiful. I need tags to be clickable and lead to all the related blogs.

smit-io avatar Jul 30 '25 13:07 smit-io

I agree, the theme is beautiful. I need tags to be clickable and lead to all the related blogs.

tags page and basic filtering have been implemented in #542

checkout this example

https://imfing.github.io/hextra/versions/latest/tags/example/

imfing avatar Aug 01 '25 17:08 imfing