mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-08 19:58:11 +00:00
Stripping the .md extension alone is not enough under Hugo pretty URLs. A page rendered at /guides/DEPLOYMENT-OVERVIEW/ treats a bare relative href like 'CLOUD-DEPLOY-WALKTHROUGH' as relative to that directory, producing /guides/DEPLOYMENT-OVERVIEW/CLOUD-DEPLOY-WALKTHROUGH (404). Switch to site.GetPage to look up the target page by its content path (resolved relative to the current file's directory) and write its RelPermalink into the href. This gives an absolute path that is correct in both the dev server and the GitHub Pages build (where --baseURL injects the /Bose-SoundTouch/ prefix via RelPermalink automatically). Also handles anchored links (OTHER.md#section) and falls back to bare-stripped path when GetPage finds no match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>