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 d7ad7aa
Browse filesBrowse the repository at this point in the historyBrowse files
The badge appears on the page. Change its `tone` in `plugins/site.ts` while the server runs: the site rebuilds and the page reloads. `build` and `publish` load the same config, so the published site gets the same badge.
91
91
92
+
## Standard plugins
93
+
94
+
PureStack includes three plugins automatically in `build`, `serve`, and `publish`:
95
+
96
+
| Package | Factory | Provides |
97
+
| --- | --- | --- |
98
+
|`@purestack/ts-components`|`componentsPlugin()`| Standard components, icons, and component styles |
99
+
|`@purestack/ts-theme`|`themePlugin()`| The `doc` and `splash` templates, generated theme CSS, and theme switching |
100
+
|`@purestack/ts-page-scripts`|`pageScriptsPlugin()`| Auth hint, consent and analytics, menus, navigation, code copying, search, and TOC runtimes |
101
+
102
+
The stylesheet provider initializes before component factories, then all config hooks run in plugin order. Names do not affect initialization. Components belong to each build, so hooks can override them through `context.components`. The theme and page runtime plugins supply head templates that run before the selected page template, preserving its ability to inspect or change the completed head. The lifecycle hook set is unchanged.
103
+
104
+
To choose the standard integrations yourself, disable the automatic set and list the plugins you want. The factories are exported from `purestack`, `@purestack/ts-ssg`, and their individual packages:
This keeps the layouts and components while omitting the page runtimes. Theme switching belongs to the theme plugin; component-specific Tabs and Modal embeds still follow the page's `embed` settings. Without the theme plugin, another plugin must supply your page templates and any CSS output you need.
116
+
117
+
An explicitly listed standard plugin replaces the automatic instance by name and keeps its initialization position. You can also use `createDefaultPlugins()` to obtain the complete set. In programmatic builds, use `options.defaultPlugins` alongside `options.plugins`.
118
+
92
119
## How the config loads
93
120
94
121
-**Where it lives.** The CLI looks for `purestack.config.ts` in the folder passed to `--content`. It must default-export `defineConfig({ plugins: [...] })`.
@@ -496,9 +523,12 @@ Every field except `name` is optional.
496
523
| Field | Type |
497
524
| --- | --- |
498
525
|`name`|`string`, unique among the site's plugins |
526
+
|`defaults`|`boolean`; makes component and template contributions overridable defaults without changing initialization order |
499
527
|`skins`| Skins by name, each `{ create(): ThemeSkinPair }`|
0 commit comments