You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2e4fa11
Browse filesBrowse the repository at this point in the historyBrowse files
A template receives a `PageTemplateInput`: the prepared `head`, the compiled `bodyHtml`, the page's nearest `headerHtml` and `footerHtml`, `site` config, `navigation`, `outline`, and `pageInfo`, whose `frontmatter` keeps any custom fields the page defines.
337
+
324
338
## Components and Regor MDX
325
339
326
-
Built-in component sets are initialized automatically each build:
Important rendering constraint: Regor components are rendered statically. Component state/events are not runtime-hydrated.
340
+
Every component in `@purestack/ts-components` is registered for each build, so content can use them directly. The [component reference](https://purestack.studio/components/) documents each one.
346
341
347
-
## Theming
342
+
Register your own Regor components through `options.components`, or assign `context.components` in the `onConfigResolved` hook.
348
343
349
-
Built-in skins export:
344
+
Components render to static HTML at build time. For behavior in the browser, load a page script with `PageScript` or mount a browser-side Regor app with `RegorApp`.
350
345
351
-
-`standard`
346
+
## Theming
352
347
353
-
Theme utilities:
348
+
The built-in skin is `standard`. Select a skin with `style.theme.skin` in `siteConfig.json`.
354
349
355
-
-`builtInSkins`
356
-
-`themes.resolve(...)`
357
-
-`themes.setOptions(...)`
358
-
-`themes.getOptions()`
359
-
-`styleBuilder`
350
+
Skins come from `@purestack/ts-style`: `themeSkins` holds the registered skins, and `registerSkin(name, skin)` adds your own before the build starts. See the [Themes guide](https://purestack.studio/guides/themes/) for creating one.
-`highlighter`: `"highlightjs"` (default) or `"shiki"`
380
369
-`disableHighlighter`: skip highlighting
370
+
-`compileMdAsMdx`: compile `.md` files as Regor MDX (default `true`); set `false` to keep `.md` as plain Markdown
381
371
382
372
## Build Hooks
383
373
384
-
Hook into build lifecycle with `BuildHooks`:
374
+
Pass `BuildHooks` through `options.hooks` to `buildSite` or `startDevServer`. Hooks, templates, and components need the programmatic API; the CLI reads only `siteConfig.json`.
0 commit comments