And in the theme I’m developing, I can access is/index.md as localhost:1313/is/ without any problems, but for some reason which I can’t comprehend, legal/index.md, which I should be able to access as localhost:1313/is/legal/ returns the REF_NOT_FOUND error and I can’t access it.
Do you have any ideas or pointers as to where I could look to solve this issue?
but I’ve also noticed that in my sitemap.xml the pages are showing correctly, and hugo server doesn’t complain about any errors while rebuilding the site.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
here’s a github repository of the theme.
These are the steps I used to replicate the issue:
cd /tmp
hugo new site danixland
cd danixland/themes
git clone https://github.com/danixland/temp-theme-danixland.git danixland
cd ..
echo "theme: 'danixland'" >> config.toml
hugo new _index.md
hugo new is/_index.md
hugo new is/legal/index.md
Then I edited those 3 pages I created to have some content in them and removed the draft statement in the front matter.
In the sitemap.xml the pages are listed correctly but when I navigate to them it returns a 404