| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Is this backwards-compatible? I.e. would existing ugly links still work? |
Sorry, something went wrong.
|
Not currently no. Do you want them to still work? I actually didn't realize until now that prettyURLs worked fine with uglyURLs enabled and both rendered the same pages identically (at least with GitHub pages). Knowing that, I could revert disabling uglyURLs and just focus on making the canonical links on both versions point to the prettyURL version. I'd actually recommend that approach instead, no reason to burn the uglyURLs and throw off backwards-compatibility if prettyURLs work fine already, idk why I thought they didn't before. What do you want to do? |
Sorry, something went wrong.
Add canonical link tags in the base template. Use .Permalink as the source and strip a trailing .html suffix so canonical URLs are extensionless (e.g. /architecture). Prefer extensionless canonical URLs because they are shorter and cleaner, while the .html variants remain valid and accessible on GitHub Pages. Canonical tags tell search engines which URL is authoritative, reducing duplicate-URL ambiguity for indexing and ranking.
|
I see now. When uglyURLs is enabled, the .html and extensionless path equivalent (magically) work identically without specifically configuring it only on GitHub Pages for this Hugo environment (unless you are doing something idk about). Otherwise, extensionless pages are broken locally and they break when I deploy on Vercel for my demo site. Knowing that's how the infra here works and that both path types will succeed, I left the URL structure alone and just added canonical tags for the extensionless version since it's shorter and smoother to read. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add canonical link tags in the base template.
Use .Permalink as the source and strip a trailing .html suffix so canonical URLs are extensionless (e.g. /architecture).
Prefer extensionless canonical URLs because they are shorter and cleaner, while the .html variants remain valid and accessible on GitHub Pages.
Canonical tags tell search engines which URL is authoritative, reducing duplicate-URL ambiguity for indexing and ranking.