Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0

HTML

Parse, render each Section type, compose, then wrap: how one Page record becomes one HTML document with one stylesheet and no framework.

View as JSON

renderPage(page, { theme }) runs four steps and returns one HTML string: a document with one <style> element and no framework.

What it renders

Harbor's blog index, one renderPage call. Widen it, narrow it to 390, or pick another Theme: every frame is a file the build wrote.

From Harbor tides › blogquaypointOpen the frame

Four steps

StepExportDoes
1PageSchema.parseAccepts the record or refuses it, naming each field over its bound
2renderBlockRenders each section's Section type, with a render context for the Theme and the shell surface it sits on
3composeWraps each section in its shell, derives every divider from its neighbors, and draws the frame
4documentWraps the body in the head lines, the Theme's typefaces and one stylesheet

Document and head runs the four steps by hand and gets renderPage's output byte for byte.

A string, not a server

renderPage returns a string, so a build writes it to a file, as Ship a Site does, and a Worker returns it per request. Neither needs a runtime of its own.

Without a script

27 of 27 Section types render no <script> element, each measured with every optional field set.

MechanismSection types
<details>faq
radio inputsterminal
popoverproduct-list
inline onclickhero, feature-split, bento, steps, command-row, agent-prompt, closing, article

Every inline handler is a button's onclick that writes text to the clipboard: a copy control, or the article's copy-link button.

On this page