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

configure hugo to use lowercase urls; add aliases for existing urls that will change #104

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

rlskoeser
Copy link
Member

@rlskoeser rlskoeser commented Jan 26, 2024

addresses #98

In the initial migration to hugo, we had a non-standard config to preserve case when generating urls which I did not catch.

This update changes that config and adds aliases for all the pages that will be affected by the change (I ran a crawl script to identify pages that would be affected)

@rlskoeser rlskoeser requested a review from jdamerow January 26, 2024 19:35
Copy link

render bot commented Jan 26, 2024

@ColeDCrawford
Copy link
Contributor

Just to confirm - this sets disablePathToLower to false, so it should be forcing lowercase paths? I am not seeing expected behavior for that. For instance, https://dh-tech-pr-104.onrender.com/SIG works but https://dh-tech-pr-104.onrender.com/sig 404s. Other aliases are also not working, for instance, https://dh-tech-pr-104.onrender.com/blog/2020-08-14-damerow-emails/ redirects over to dh-tech.onrender.com (no PR URL) and then 404s. Not sure if this is an issue with the PR or with Render?

@rlskoeser
Copy link
Member Author

Yes, it should be lower-casing paths instead of preserving case. I overrode the SIG to keep it uppercase, but in my local dev it redirected from lowercase to uppercase.

I'll check the other items you flagged and see what I can figure out. Could be some of it is render vs local, but would be good to know!

@rlskoeser
Copy link
Member Author

@ColeDCrawford I added an alias for lowercase url version of SIG (IDK why I thought it was working before, maybe a holdover from before I changed the slug).

I think the other redirects not working properly is a render issue... the redirect page has to return a full url, and the render PR build doesn't have that configured anywhere. When I test with curl it looks like the redirect works the way want it, barring the wrong absolute url on the PR site

@ColeDCrawford
Copy link
Contributor

Got it. Then I think this is good to go if the issue is Render and not the redirects.

@rlskoeser rlskoeser merged commit 07a36df into main Jan 30, 2024
@rlskoeser rlskoeser deleted the lowercase-urls branch January 30, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants