Last 12 weeks · 15 commits
1 of 6 standards met
Problem In production, every internal link on the site points to a slash-less path (, , , ...). The site builds in Astro's default directory format, so each page's canonical URL carries a trailing slash (). Netlify's Pretty URLs post-processing therefore answers a 301 redirect from the slash-less URL to the canonical one on every internal navigation. The result is 200–500ms of added latency per click: the browser makes two round trips before the page starts loading. Why it didn't show up in dev Astro's dev server with the default serves both and with a direct 200, so the redirect only happens on the static host. Root cause defaults to , so pages are emitted as and the canonical URL has a trailing slash. Internal links were authored without the trailing slash, so each one mismatches the canonical URL and gets redirected. Fix Set in . This makes the convention explicit and makes the dev server redirect too, so the mismatch is reproducible locally and future slash-less links are caught before they ship. Add a trailing slash to every internal link. Most were generated dynamically, which is why they weren't obvious: and (nav data arrays) and ( template literals, the biggest source of redirects when browsing the catalog) literal links in , , , , External links and file assets (, , , ...) are left untouched. Verification succeeds (31 pages). Grep over the generated : zero slash-less internal links remain. Preview server: , , , , , , all return 200 directly. Note Old slash-less URLs already indexed or linked externally will still receive Netlify's 301, which is the correct canonicalization behaviour for SEO. This PR removes the redirect hop from internal navigation, which was the source of the latency.
Repository: addyosmani/skills.addy.ie. Description: Agent Skills official site Stars: 25, Forks: 2. Primary language: Astro. Languages: Astro (50.5%), HTML (21.8%), TypeScript (15.5%), JavaScript (7.1%), Python (3%). Homepage: https://skills.addy.ie Topics: agent-skills, agents, claude, codex. Open PRs: 0, open issues: 0. Last activity: 3d ago. Community health: 28%. Top contributors: addyosmani, nucliweb.