/tags suddenly empty when i rename a markdown file ... ?!

Okay. This is super weird. I am talking about my site (flypenguin dot de, repo gitlab dot com/flypenguin/hugo-flypenguin-de/), which – as of today – I am building a theme for (link further down, sorry about that, “new user” link count restrictions).

Now, if I rename the file /content/about.md to content/index.md, my /tags suddenly shows “No tags”, which I consider really really weird. I don’t change anything else.

Also, the “Posts” menu item vanishes. Again – just by renaming the file content/{about -> index}.md.

At least (:man_shrugging:) the /posts URL is also unavailable in the latter case.

The code to render the navbar is this:

<div class="navbar-start">
    <a href="{{ .Site.BaseURL }}" class="navbar-item">Home</a>
    <a href="/tags" class="navbar-item">Tags</a>
    {{- range .Site.Sections }}
    <a href="{{ .RelPermalink }}" class="navbar-item">{{ .Name }}</a>
    {{- end }}

the code to render the tag word cloud is this (a bit too big to paste …).

so, i am “slightly” confused, and would appreciate any help from some more enlightened hugo magicians :wink: … .

if you want to reproduce, just clone my site and rename the file … that is all.

thanks in advance!

Rename content/index.md to content/_index.md.

1 Like


maybe some more info for google-people hitting this: in my case, index.md apparently marked the content directory as leaf-bundle, which is not what we want. (we want a branch-bundle).

and if you want to edit the main page of your home page, use _index.md, as documented here.

some more topics here:

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