Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly changing "blog" to "blog/" in nav.html? #95

Open
h0bbl3s opened this issue Jul 28, 2024 · 1 comment
Open

Possibly changing "blog" to "blog/" in nav.html? #95

h0bbl3s opened this issue Jul 28, 2024 · 1 comment
Labels
question Further information is requested

Comments

@h0bbl3s
Copy link

h0bbl3s commented Jul 28, 2024

@janraasch I was having difficulty with my site having some very odd linking behavior related to the blog folder. When I generate my site all of the index.html pages have "/blog" for the link instead of "/blog/".

I'm not entirely sure why but this only seems to affect navigation of the site when visited in firefox on my pc. I attempted to tinker with my nginx configuration but to no avail. I changed line 6 in nav.html to have "blog/" and now all of my index.html files generate properly.

Is this a bug and it should be "blog/"? Or is this just a strange edge case affecting my firefox. I have no issues since generating my site with the altered nav.html . I noticed you have previously removed a leading / in that file. If nothing else can you explain to me what could cause a browsers navigation to get thrown off by the missing / ? Thanks for any help.

@janraasch
Copy link
Owner

janraasch commented Aug 9, 2024

Hi @h0bbl3s,

to be quite honest with you 😇: I can't remember why the blog is not part of the .Site.Menus.main like everything else is (see https://github.com/janraasch/hugo-bearblog/blob/master/layouts/partials/nav.html).

Having this hardcoded blog (or blog/ ... either way 😁) just seems wrong doesn't it? I'd be happy for you to come up with a pr that makes blog/_index.md part of Menus.main.

To your question though: I can follow & understand that the link to /blog is always generated without the trailing slash due to the templating as you pointed out, but I didn't understand how this affects navigation on Firefox for you. Could you elaborate on that please 🙏🏻 ?

@janraasch janraasch added the question Further information is requested label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants