-
Notifications
You must be signed in to change notification settings - Fork 61
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
[BUG] - Add trailing / whenever referring to a directory #360
Comments
FWIW I did try setting uglyurls = true in my config.toml but it didn't seem to change anything. |
I am pretty sure that you just set that in your The theme isn't doing that, it's just reading what is in |
OK, I guess then this request should be to update the config.toml and sample website to put the trailing slash there, per the official correct behavior documented by spf back in 2014. This way future people using this theme with something like AWS to host won't be caught in this quandary. |
that's not a bad idea! go ahead and submit a PR for that one! |
OK I'll open a more explicit issue in case anybody else runs into it. |
Describe the bug
This is one of those bugs that may be very easy to fix, or it might be a lot of ridiculous work, I don't know.
This theme, when referring to subdirectories, does not append the trailing /. For example, the contact page is just "hostname/contact" instead of "hostname/contact/". This may not seem like a big deal because it usually works on most hosting providers, but this makes it not work when your website is hosted on s3 using cloudfront as a CDN, because cloudfront requires you to have the trailing / in order to attempt to load index.html.
I'm hoping this is an easy fix, because other hugo themes do this already. For example, see:
https://themes.gohugo.io/theme/hugo-universal-theme/
The faq link is (note the trailing slash):
https://themes.gohugo.io//theme/hugo-universal-theme/faq/
Making this change would be backwards compatible as when you go to
https://sample-castanet.netlify.app/contact
it will redirect you to
https://sample-castanet.netlify.app/contact/
anyway.
The text was updated successfully, but these errors were encountered: