Skip to content

fix: Consistent URL endings concept (#411)#827

Open
Aayushman-nvm wants to merge 1 commit intoprecice:masterfrom
Aayushman-nvm:issue411
Open

fix: Consistent URL endings concept (#411)#827
Aayushman-nvm wants to merge 1 commit intoprecice:masterfrom
Aayushman-nvm:issue411

Conversation

@Aayushman-nvm
Copy link

@Aayushman-nvm Aayushman-nvm commented Mar 1, 2026

Summary

Standardizes the About page to use an extensionless permalink (/about/) and fixes relative asset paths that broke when switching away from /about.html.


Changes

  • Permalink: about.html/about/, with a redirect_from: /about.html redirect
  • Canonical URL: Replaced .html removal hacks with {{ page.url | absolute_url }}
  • Asset paths: Fixed relative images/ and css/ references using | relative_url to prevent /about/images/... misresolution
  • Internal links: Replaced .html links (e.g. privacy.html) with extensionless equivalents (e.g. /privacy/)

Note

  • The scope of this PR is intentionally limited to the About page to keep the change small, isolated, and easy to review.
  • The same pattern can be systematically replicated across other pages to fully address issue Consistent URL endings #411.
  • Updated head.html to remove the assumption of a flat URL structure (i.e., direct .html file endings). The previous logic did not account for nested paths or directory-based URLs.
  • Similar adjustments may be required in other templates where this flat URL assumption exists.

Why

  • Removes flat-file permalink assumptions
  • Compatible with permalink: pretty and Hugo's default URL structure
  • Reduces migration friction and improves long-term URL hygiene

Testing

  • /about/ loads correctly
  • /about.html redirects to /about/
  • All assets and internal links resolve without issues

@MakisH MakisH added technical Technical issues on the website GSoC Contributed in the context of the Google Summer of Code labels Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Contributed in the context of the Google Summer of Code technical Technical issues on the website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants