I’m simply trying to link to another page on my site. I have a nav with a list of places on my site that I want to link to, but they all result in a 404 when clicked.
I want it to replace the current block of text when I click an option in the nav with whatever is similarly named in the content folder. So when I click “About” in my nav, I want it to display the text in the about.md file through the <main>
in my baseof.html file.
Here’s my code: GitHub - Jaspev/first-hugo-site
How I understand my code working is that the first thing hugo loads is the baseof.html file located in layouts/_default, and that file is loaded on every single page.
In the baseof file, it is loading my nav as a partial. In my nav partial it is going through a range asking for every file in content that has the “type” variable = “nav” in it’s front matter, then lists everything it gets, and it sets every item’s href to {{ .RelPermalink }}. I’ve also tried “Permalink” instead of “RelPermalink” and it didn’t work.
In the baseof file it is also setting the main part of the page to simply be {{ .Content }}.
I’m not using any theme.
This is my hugo env:
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended windows/amd64 BuildDate=2024-01-05T12:21:15Z VendorInfo=gohugoio
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.21.5"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"
Thank you!