Taxonomy searches give no results

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:

  - category
  - tag

I have a bunch of “item” pages that have some taxonomy front-matter:

        - Woodworking
        - toys
        - boats

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?


Not working:

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.

├── 01.home
│   └──
├── 02.woodworking
│   ├──
│   ├── toy-boat-1
│   │   └──
│   └── toy-boat-2
│       └──
├── 03.modelling
│   ├── 01.chieftain
│   │   └──
│   └──
└── 04.workshop
    ├── 01.wood-tools
    │   ├──
    │   ├── lathe-tools
    │   │   └──
    │   └── mini-lathe
    │       └──
    ├── 02.wishlist
    │   ├── 01.chip-extraction
    │   │   └──
    │   ├── 02.sharpening
    │   │   └──
    │   └──


@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’.

Maybe the plugin relatedpages can help with that.

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.

@Cylindric Just had to have a second look…

The multiple blogs issue can be ‘worked around’ by using the following:

  • Override Quarks partial template ‘taxonomy.html.twig’
    in ‘user/themes/mytheme/templates/partials/blog/taxonomy.html.twig’
  • Add the following to the top:
    {% set blog = page.parent.template == 'blog' ? page.parent : 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 :slight_smile:

FYI the git repo is at

I might have a look at some less “blog focused” templates.

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.