Content/terms rendering as a Section after version 0.58.3

I am troubleshooting a behavior change sometime after v 0.58.3 regarding Section and Term rendering.

I’ve posted my testing steps in my next response below.

I have been using Hugo v 0.58.3 and my template is:

  • rendering Sections as directories in /content
  • term frontmatter and content in /content/tags/

For example /content/tags/mytag1/ successfully renders content (related to all pages with mytag1) in my term list view.

In version 0.58.3 my sections and term pages are showing as expected.

In latter versions (confirmed with 0.77.0 and 0.83.1) my /content/tags/ is being rendered as a Section.

My taxonomy config:
tag: “tags”

In leiu of backing out my site to a minimal example, I wondered if anyone had some “lightbulb” insight. Thanks in advance.

If you can’t share a repo, please post a tree view of your layouts directory (both project root and theme).

Thanks @jmooring. My website is public so I should just share.

Here are my steps to test

git clone versionTestTwo`
cd versionTestTwo
git submodule init
git submodule update

docker run --rm -it \
  -v $(pwd):/src \
  -p 1313:1313 \
  klakegg/hugo:0.58.3-ext-alpine \

My quick test is that my nav is build on Section headers so “Tags” does not show up in my navigation bar in top right.

But with a later version of Hugo:

docker run --rm -it \
  -v $(pwd):/src \
  -p 1313:1313 \
  klakegg/hugo:0.77.0-ext-alpine \

“Tags” is showing in my navigation bar in top right which is not desired.

Thanks for poke on repo.

Tested with v0.83.1.

URL Template
tags/ themes/fullstack-portfolio-refresh/layouts/_default/terms.html
tags/r/ themes/fullstack-portfolio-refresh/layouts/_default/taxonomy.html

This is correct according to the template lookup rules.

I’m not sure what you mean when you say “my /content/tags/ is being rendered as a Section.”

Thanks @jmooring

I think I am troubleshooting that the terms directory “Tags” .Title is getting rendered in this logic through a range of Sections. But only in later versions of Hugo > 0.58.3.

Trying to figure out documentation that would point out what Section property I can read or use to filter “Tags”, part of my taxonomy, out from the content related Sections. And/or config options to keep 0.58.3 behavior.

 {{- range .Site.Sections -}}
          {{- if not (eq .Title "singles") -}}
          {{- $secCount := len .Sections -}}
          {{- if (ne $secCount 0) }}
          <div class="navbar-item has-dropdown is-hoverable">
            <a href="{{- .Permalink | relURL -}}" class="navbar-link">
              {{- if $showIcons -}}
                <i class="fa fa-book" style="color:{{- print $mainColour -}};">&nbsp;</i>
              {{- end -}}
              {{- .Title -}} 
            <div class="navbar-dropdown">
              <!-- <a href="{{- .Permalink -}}" class="navbar-item">
                > All
              </a> -->
              {{- range .Sections -}}
              <a href="{{- .Permalink | relURL -}}" class="navbar-item">
                {{- .Title -}} ######  THIS LINE RENDERS IN HUGO>0.58.3  ########
              {{- end -}}
          {{- else -}}
          <a href="{{- .Permalink | relURL -}}" class="navbar-item is-secondary">
            {{- if $showIcons -}}
              <i class="fa fa-book" style="color:{{- print $mainColour -}};">&nbsp;</i>
            {{- end -}}
            {{- .Title -}}HOLLER
          {{- end -}}
        {{- end -}}

I just figured out my problem

tags had the following Tree structure


Since I had a file that was not the directory was getting rendered as page content/section.

I was stuck at that this behavior changed in different versions.

Gotcha; it was appearing in the menu. Nice find; well done!