dh-tech / dh-tech.github.io

The international grass-roots community of Digital Humanities software engineers.
https://dh-tech.github.io/
5 stars 9 forks source link

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

Closed rlskoeser closed 7 months ago

rlskoeser commented 7 months ago

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)

render[bot] commented 7 months ago

Your Render PR Server URL is https://dh-tech-pr-104.onrender.com.

Follow its progress at https://dashboard.render.com/static/srv-cmq0j4fqd2ns738aa6i0.

ColeDCrawford commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

@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 commented 7 months ago

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