Skip to content

feat: build the site shell and render its pages - #8

Merged
DutchyD merged 7 commits into
mainfrom
development
Aug 11, 2026
Merged

feat: build the site shell and render its pages#8
DutchyD merged 7 commits into
mainfrom
development

Conversation

@DutchyD

Copy link
Copy Markdown
Contributor

What

The site shell, the pages rendered inside it, and the hero.

Shell. Navigation, locale and theme selection, the project index and the project detail view. Locale is resolved server-side and carried on the response, so no locale prefix appears in the path.

Pages. Pages declared by the API drive the navigation. A splat route renders any of them from /v1/pages/{slug}; the page claiming home is served at the root, and its slug redirects there so one page never has two URLs. Sections render in declaration order with a divider between each pair.

Hero. Headline, subheadline, calls to action and portrait. The dimensions the API measured drive an aspect-ratio box, so the image reserves its space before it loads. Actions route when the API gives a path and open a new tab when it gives a URL. The site title and tagline no longer open the home page — they carry the document title and meta description, and the hero carries the claim.

Contract handling

Every response is validated against the published contract before it reaches a component. Section types are validated leniently: a type this client does not render is skipped, so the rest of the page and the navigation around it still render. A malformed known type is a contract error rather than a silent skip. In development, a skipped section and any page slug a file route would shadow are reported to the console.

Deploys with Folio

/v1/site no longer carries section bodies, so this requires the matching Folio release. The API goes out first.

DutchyDand others added 7 commits August 10, 2026 11:11
The commit-msg hook only guards local commits; a squash merge takes its
subject from the PR title, which nothing validated.
ci: lint pull request titles against the conventional preset
Types and Zod schemas are generated from the contract Folio publishes, so
the shapes cannot be hand-maintained into disagreeing with it. Model types
are inferred from the schemas that parse the responses, leaving one
definition rather than a type and a validator that can drift apart.
Reads go through the server only. The client takes its base URL and fetch,
holding no reference to the environment, so it is exercised without one.
Every response is parsed at the boundary, which is where a deployment that
disagrees with the published contract becomes a named error instead of an
undefined three components deep.
Failures are reported, not decided: a category and the API's own problem
details, leaving the route to choose between a 404, a retry and an error.
feat(api): add the Folio client, its models and its environment
The shell carries the navigation, locale and theme selection, and the
project index and detail views. Pages declared by the API drive the
navigation, and a splat route renders any of them from
`/v1/pages/{slug}`, with the home page served at the root.
Sections render in declaration order with a divider between each pair.
The response is validated against the published contract, and a section
type this client does not render is skipped so the rest of the page
still renders.
A hero renders its headline, subheadline, calls to action and portrait.
The measured dimensions drive an aspect-ratio box, so the image reserves
its space before it loads. Actions render as links, routing when the API
gives a path and opening a new tab when it gives a URL.
The site title and tagline no longer open the home page; they carry the
document title and meta description, and the hero carries the claim.
feat: build the site shell and render its pages
@DutchyD
DutchyD merged commit d803436 into mainAug 11, 2026
2 checks passed
Sign up for freeto 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

@DutchyD