3.2 KiB
3.2 KiB
U6 SEO and performance: plan (draft for approval)
Basis: owner answers in inception/application-design/unit-u6-seo-and-performance.md (option E, hybrid).
Approach
- Static text (hero, about, process, contact, variant-neutral copy): prerendered into
index.htmlat build time (ReactrenderToStringof the default Variant B shell in a post-build script; the client hydrates). Variant E (easter egg) stays client-only and is not indexed content. - Dynamic parts (packages now, gallery later): the CMS host (WebsiteMode
SpaFallbackfor SLP) injects current data into the served HTML (JSON-LDOfferlist plus the package markup placeholder) per request with a short cache (target: fresh within minutes). The client still fetches/api/v1/offeringsand takes over. If the host injection is not available yet, the page degrades to static text plus client-side packages (no breakage). - Per-environment rules from the host, not the bundle: test hosts serve
robots.txtDisallow: /andX-Robots-Tag: noindex; production servesrobots.txtwith sitemap reference. No password protection.
Work split
| Part | Website repo | CMS repo (slp-modular-cms) |
|---|---|---|
| Prerender static HTML | build script, hydration, tests | - |
| Meta: canonical, Open Graph, Twitter, favicon set, theme-color | index.html + build |
host fills absolute URLs from the request host |
| JSON-LD Organization / LocalBusiness | static in build | - |
| JSON-LD offers + packages HTML injection | placeholder markers | host injection with cache |
robots.txt, sitemap.xml, X-Robots-Tag |
- | host, per environment setting |
Performance: LCP image dimensions + fetchpriority, display-font preload, chunk budget |
yes | cache headers for hashed assets |
| Lighthouse gate (mobile + desktop, >= 0.9 per category, as ASF) | lighthouserc*.cjs + pipeline job on the built site |
- |
Steps
- Add NFR group "SEO and performance" to
requirements.md(below) and get approval of this plan. - Website: meta tags, favicon set, JSON-LD organisation, LCP and font preload.
- Website: prerender script + hydration; tests that the HTML contains hero/about/process/contact text and no duplicate ids.
- CMS (via CMS session): robots/sitemap/
X-Robots-Tagper environment; packages + JSON-LD injection with short cache. Contract: marker comments inindex.html. - Website pipeline: Lighthouse job (mobile + desktop, hard gate 0.9), runs on any runner (
linux). - Verify on test: crawler view (
curl), Lighthouse results,noindexheader, CSP unchanged (no new third-party scripts). - Production only on explicit owner go.
Risks
- Hydration mismatch between prerendered and client output (theme, variant, date): prerender only the default Variant B/light shell; theme applied after hydration.
- Hash routing stays (single page); sitemap lists the one URL plus the privacy page if it gets a real URL.
- Host injection needs CMS work and a deploy to both hosts; ASF has the same pattern later (gallery), so keep the marker contract generic.
Open points for the owner
- Is the privacy page to become a real URL (affects sitemap)? Currently hash route.
- Domain used for canonical/OG on production:
https://slpsoftware.nl(assumed).