Skip to content

fix(seo): give every page its own head tags and stop redirecting sitemap URLs - #18

Merged
erkamyaman merged 2 commits into
mainfrom
fix/seo-pass
Nov 3, 2026
Merged

erkamyaman merged 2 commits into
mainfrom
fix/seo-pass

Conversation

@erkamyaman

Copy link
Copy Markdown
Member

Every sitemap URL answered with a 307 to a trailing-slash address, all pages shared one description, and no page had a canonical URL. This fixes those and the layout shift on pages with demos and images.

Changes

  • Serve pages without a trailing slash (html_handling in wrangler.jsonc), so links, sitemap and canonicals get a 200. Old slash addresses now 307 to the new form.
  • Write the description, canonical, Open Graph tags and JSON-LD per page (SeoService): TechArticle on docs pages, BreadcrumbList on all but the 404 and home, WebSite on home. No author is set.
  • Render ngmd-image as a real <img> in the prerendered HTML, and reserve space for ngmd-demo and ngmd-hero until they upgrade.
  • Convert the docs images and the landing cover to WebP (og.png and icons stay PNG).
  • Titles now read Page | slide.ng. built-in/layouts is titled "Built-in layouts" so it no longer duplicates the guide page.
  • Breadcrumb crumbs that are real pages are links.
  • check:dist now fails on a missing or duplicate title, description or canonical, on anything other than one h1, and on an image without alt.

The landing deck was rebuilt with core at db6efd8, the version from when it was last built. Core 3.3.0 adds about 200K of JS and made the home page slower.

Measurements

Before is the live site. After is a local Cloudflare runtime behind a proxy adding compression and delay, so this is not a strict comparison. Mobile is slow 4G with 4x CPU throttling, median of 3 runs.

Page CLS LCP Load
/ 0.002 → 0.002 1.07s → 1.01s 3.76s → 3.15s
/welcome 0.216 → 0.002 2.62s → 0.82s 2.07s → 1.76s
/guide/syntax 0.134 → 0.006 1.06s → 0.83s 2.09s → 1.76s
/guide/presenter-mode 0.232 → 0.002 1.14s → 1.24s 2.17s → 1.83s

The home page stays over 2s to load because of the landing demo's two iframes.

Testing

Build, unit tests, format check and check:dist pass. check:landing fails "replay clears the editor", and the committed script fails the same check against the live site.

Not verified

  • Production after deploy, including the no-slash URLs and real CLS and load numbers.
  • Google's Rich Results Test.
  • The GitHub Pages build, which will probably still redirect to trailing slashes.

…map URLs

- serve pages without a trailing slash, so links, sitemap and canonicals get a 200
- write description, canonical, Open Graph and JSON-LD for each page
- render ngmd-image as a real image and reserve space for demos and the hero
- convert docs images and the landing cover to WebP
- check titles, descriptions, canonicals, h1 and alt text in check:dist
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
692a6d3 2026-11-02T14:25:43.683Z View logs ↗
  • Build: Failed ❌

View logs ↗
2ab7275 2026-11-02T11:10:45.871Z View logs ↗

@erkamyaman
erkamyaman merged commit 10d3903 into main Nov 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant