[Hugo] Phase 1 · Decision: hosting, redirects and trailing slashes
Parent: #8297 · Open decision: "Hosting and redirects (Cloudflare redirect rules, Cloudflare Pages, or Netlify)"
Facts (checked 2026-11-03)
- Production is GitHub Pages, not Netlify.
.github/workflows/build-and-deploy-site.ymlbuilds Gatsby and pushespublic/togh-pageswithJamesIves/github-pages-deploy-action. It writesCNAMEand.nojekylland excludespr-preview/and.well-known/from cleaning. PR previews are published tohttps://layer5.io/pr-preview/pr-<n>/byrossjrw/pr-preview-action. - GitHub Pages ignores
_redirects. TheRedirectsoutput format inhugo.yaml(and FIRST_RUN_REPORT §4) has no effect there. - Redirects today are HTML stubs.
https://layer5.io/books/returns<meta http-equiv="refresh" content="0; URL='/learn/service-mesh-books'"><link rel="canonical" …>, written byplugins/gatsby-plugin-meta-redirect. Hugoaliasesproduce the same kind of stub by default. - Trailing slashes:
https://layer5.io/company/about→301→/company/about/(served by GitHub Pages). The canonical andog:urltags and the sitemap use/company/aboutwithout a slash, so the canonical URL currently points at a redirect.
Recommendation
- Stay on GitHub Pages for the cutover. Only the build step changes: no DNS change, and PR previews and
.well-known/keep working. Revisit Cloudflare after cutover as a separate project. - Redirects = Hugo
aliases(HTML stubs), the same mechanism as today. Keep the_redirectsoutput only if a host that supports it is chosen later. - Trailing slash: emit
/path/(Hugo's default) for canonical, sitemap and internal links. That is the URL that returns200, which fixes the current canonical-to-redirect problem. Every old slash-less URL keeps working through the existing GitHub Pages 301.
Tasks
- [ ] Maintainers confirm or amend 1–3 in this issue.
- [ ] Record the decision in
hugo/README.md. Remove or flag theRedirectsoutput format accordingly. - [ ] Customize
layouts/alias.html(if needed) to match the current stub (meta refresh + canonical).
Contributor Resources and Handbook
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.
- 📚 See contributing instructions.
- 🎨 Wireframes and designs for Layer5 site in Figma (open invite)
- 🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack.
Join the Layer5 Community by submitting your community member form.
Hi @saurabhraghuvanshii , I would like to work on this issue. Could you please assign it to me? I’ll investigate and work on the required changes. Thank you!
Hi @saurabhraghuvanshii, I'd like to work on this issue
Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a MeshMate (https://meshery.io/community/meshmates/) or any other community member (https://meshery.io/community) for assistance.
Thanks @08abhinav - PR #8501 merged on 2026-11-27, so this looks resolved. Leaving it open for a maintainer to confirm and close.