Adding taxonomy config breaks list.html

Hi, I have the following content structure

/content/ebooks/
/content/ebooks/ebook-1/
/content/ebooks/ebook-1/cover.jpg
/content/ebooks/ebook-1/_index.md
..
/content/ebooks/ebook-9/
/content/ebooks/ebook-9/cover.jpg
/content/ebooks/ebook-9/_index.md

And the following layout

/layouts/ebooks/
/layouts/ebooks/list.html
/layouts/ebooks/single.html

When I access /ebooks/ I get the list of the 10 ebooks and when I access /ebooks/ebook-1/ I get the single html.

All works good but as soon as I add the taxonomy configuration the list page doesn’t render the elements like if the content folder (/content/ebooks/) was empty.

[taxonomies]
  category = 'categories'
  tag = 'tags'
  item = 'items'

That happens regardless the taxonomies that I setup, even if I only add [taxonomies] without anything below the list stops to work but as soon as I remove the [taxonomies] the list works well.

Where is my list.html for the ebooks.

{{ define "main" }}
      <h1 class="heading-1">{{ .Title }}</h1>
        {{ range .Pages.ByTitle }}
           <div>
              <h2 class="heading-2">
                <a href="{{ .RelPermalink }}">
                  {{ .LinkTitle }}
                </a>
              </h2>
          </div>
        {{ end }}
{{ end }}

Look like when the [taxonomies] is set for some reason the range .Pages return nothing.

I really need to set taxonomies but I also want this list to work with the normal page list. Any help or ideas are welcome!

Thanks.

Based on what you’ve provided I’m not sure if this is related, but the path above should be:

/content/ebooks/ebook-1/index.md

No underscore.

It would be helpful if you were to share your repository so that we can easily reproduce the problem.

You are right, I have _index.md on my repo, it was I typo.

I can’t share the repo but I will try to make a clean repo to replicate the issue and share it.

1 Like

Found the issue, I was using a taxonomies.toml and inside [taxonomies] tag, when I removed the tag the issue got solved. For some reason when the tag is used inside that file the list pages stop to render the Pages.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.