Skip to content

docs: sell the standards, type-safety and defaults case on the site, and give the landing page a narrative spine #1392

Description

@vivek7405

Problem

Two separate gaps on the marketing pages.

The claims. Several things that are true of WebJs and matter to someone deciding whether to use it are stated nowhere on a marketing page. Full-stack type safety appears on /docs/typescript and in blog/full-stack-type-safety-no-build.md, but on none of /, /why-webjs, or /what-is-webjs. The no-build bet is asserted without a production precedent anywhere on the home page, even though Rails has shipped its default frontend without a bundler since Rails 7 in 2021 (only articles/no-build-javascript-framework.md mentions Rails at all). /why-webjs lists what a scaffolded app arrives with and never says any of it is replaceable, which is exactly the objection that grid raises, and which contradicts the standing "defaults, not lock-in" position. The cross-agent skill at .agents/skills/webjs/ is documented on /docs/ai-first but never sold on the pitch page. And nothing frames the standards alignment as a stance a reader gets something for, rather than as a list of implementation choices.

The structure. website/app/page.ts reads as a spec sheet. Seven sections, each true, none setting up the next, so nothing on the page earns a scroll. Start where you are had no lede at all, just a bare <h2>.

Design / approach

Two commits, already on docs/website-standards-copy.

The claims land where geometry allows rather than as a new section each. Three grids on these pages paint an empty cell in the grid's own border colour when the entry count goes odd (gap-px over bg-border with overflow-hidden), so a new point either replaced a card body or arrived in a pair. The home bento stayed at 6 by rewriting two card bodies; /why-webjs's ARRIVES went 4 to 6; /what-is-webjs took two FAQ entries, which is a vertical list with no geometry constraint and which feeds the FAQPage JSON-LD for free.

The narrative spine keeps every section and its order, and rewrites the ledes so each opens by picking up what the previous section closed on. That was chosen over an origin-story block or a walkthrough section because it costs no new page weight and fixes the actual defect, which is that the sections do not connect.

The register on the opening beat credits the trade rather than mocking it ("frameworks got good at hiding the platform, and for years that paid for itself"), matching what /why-webjs already does with "Most frameworks leave the big decisions open, and that flexibility is the point of them".

Implementation notes (for the implementing agent)

Already implemented. Recorded here so the reasoning survives the merge.

Where the edits are:

  • website/app/page.ts hero lede, the five section ledes, the Zero build step and Server actions, fully typed bento card bodies, and a new defaults paragraph in the #templates section.
  • website/app/why-webjs/page.ts ARRIVES (L79), plus a new paragraph after the grid that renders it.
  • website/app/what-is-webjs/page.ts FAQ (L52) and the Server actions with real types entry in CAPABILITIES (L169).

Landmines:

  • Grid parity. ARRIVES renders into grid-cols-1 xs:grid-cols-2, and the home bento into xs:grid-cols-2 wide:grid-cols-3. An odd count leaves a solid border-coloured cell the full height of the row. A comment above ARRIVES now states this; the home bento's constraint is stricter (a multiple of 6 is even at both breakpoints) and is why type safety folded into the existing server-actions card instead of becoming a seventh.
  • The spine is fragile in a way that is invisible to tests. The hand-off lives in the FIRST sentence of each lede, so rewriting one in isolation so it opens on its own topic silently reverts the page to a spec sheet. A block comment above STATS in page.ts records the chain and says so.
  • Server action & SSR page was renamed to Nothing is compiled away. The h2 was the only place that hand-off could live, and the code windows already caption themselves Server action (RPC) and SSR page, so the literal label was not lost. test/ssr/ does not pin this heading, but check before renaming it again.
  • Keyword cannibalization. The Rails precedent is one clause on the home page on purpose. articles/no-build-javascript-framework.md owns that keyword, and per website/AGENTS.md two pages must not chase the same one.
  • The agent-skill claim is deliberately weaker than the pitch. The scaffold ships ONE cross-agent skill with references, not separate design-system and modules-architecture skills, so the copy says "a skill covering the design system, the modules architecture, and the rest of the conventions". Strengthening that wording requires a scaffold change first.

Invariants: the prose punctuation and brand-casing rules (root AGENTS.md invariant 11, enforced by .claude/hooks/block-prose-punctuation.sh), and website/AGENTS.md on FAQ entries being both rendered and emitted as schema from one array.

Surfaces: website/ only. No packages/*/src change, so no docs-site or scaffold sync is owed.

Acceptance criteria

  • / states the web-standards stance, full-stack type safety, the Rails 7 no-build precedent, and that the scaffold's stack is a default rather than a lock-in
  • /why-webjs carries type safety and the agent skill as cards, plus the overridable-defaults paragraph
  • /what-is-webjs answers "Is WebJs tied to Tailwind and Drizzle?" and "Does WebJs give you full-stack type safety?" in the FAQ, so both also reach the FAQPage JSON-LD
  • Every section lede on the landing page hands off to the next, and Start where you are has a lede
  • No grid renders an empty border-coloured cell at any breakpoint
  • webjs typecheck, webjs check, and webjs test --server (471 tests) all pass

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions