I have a new site I’ve recently started using Grav v1.5.0-beta.2 with. I’m using a custom theme that is just a few changes and inherits the Quark theme.
My site.yaml has the default taxonomies set for category and tag:
taxonomies:
- category
- tag
I have a bunch of “item” pages that have some taxonomy front-matter:
But when I click on any of the tags in the pages, which take me to URLs such as “/tag:toys”, I always get zero results.
If I use the links on blog pages in the sidebar, I see that the URL is restricted to the category they are in, so “/woodworking/tag:boats”, and that seems to work.
How can I get the tag URLs to work across the whole site?
My site hierarchy is as follows. It’s not a classic blog, so there isn’t just a single chronological stream of posts. I’m trying to create a personal notes site.
@Cylindric I haven’t worked with blogs yet, but did some investigation.
Theme Quark needs the variable ‘blog-page’ to point to the correct blog page.
To fix the issue mentioned above, copy ‘user/themes/quark/quark.yaml’ to ‘user/config/themes/quark.yaml’ and set ‘blog-page’ to ‘/woodworking’
Unfortunately, this only fixes the issue you mentioned. You are also using the ‘blog’ template on other pages. And their items will all be pointing to ‘/woodworking’.
Thanks for looking into it. I suspect I might be making some wrong assumptions from the start, so I’ll have another look at the template.
Basically I’m not really creating a blog, but a general info site with various categories - woodworking, metalworking, tools, etc, so maybe blog isn’t the right thing to be looking for.
Unless maybe I can create a root “/blog” with the various categories under that, and then hide the root /blog.
I don’t think that’s made much difference. I think I’ll have to go back a step and see if what I’m trying to do is actually the “Grav Way”, because if I’m fighting it this much I’m probably doing something wrong. Thanks for having a look though
I’m having a very similar issue with taxonomy search and filtering. I too have a multilayered site. Mine is church recorded sermons series. So I have a /media page that lists the series. Then /media/series_name where the messages in that series are listed with playback and download.
The taxonomylist plugin at the /media level collects the tags from all series and recursively from all messages, which seems to be it’s default behavior. If I click a tag that is on a series it will show the result but if I click a tag that’s on a message no results display even though it knows the tag is there.
So in short, in collects tags from children and descendants but it will only display the results of immediate children. If I go down a level (/media/series) the filtering works for the messages within that series but nowhere else.