Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ With the folder layout above, `index.mdx` renders at `/`, and `guides/getting-st
| `basePath` | Public mount path, such as `/docs`, used in generated URLs and the dev server. It does not add a `docs` folder inside the output directory. |
| `html.minify` | Minifies generated HTML during a normal build; defaults to `false`. |
| `scripts.cacheBusting` | Adds a build cache key to emitted local TypeScript script filenames; defaults to `true`. |
| `scripts.sharedLibraries` | Package import specifiers shared across page scripts. Regor is always included. List subpaths explicitly; generated modules use content-hashed filenames under `assets/runtime/`. |

For example, with `"outDir": "../dist/site"` in `content/siteConfig.json`, the build writes into `dist/site` beside `content`. `"basePath": "/docs"` makes the home page publicly available at `/docs/`, while its output file remains `dist/site/index.html`. Host that output at `/docs/`; changing the config alone cannot change a host's routing.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "purestack-repo",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.18.1",
"type": "module",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/purestack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "purestack",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/purestack.mjs",
"types": "./dist/purestack.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/purestack/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const version: string = '1.1.18'
export const version: string = '1.1.19'

export * from '@purestack/ts-ssg'
2 changes: 1 addition & 1 deletion packages/ts-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-common",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-common.mjs",
"types": "./dist/ts-common.d.mts",
Expand Down
2 changes: 2 additions & 0 deletions packages/ts-common/src/site-config-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export interface AuthConfig {

export interface SiteScriptsConfig {
cacheBusting: boolean
/** Package import specifiers emitted as shared browser modules. Regor is always included. */
sharedLibraries: string[]
}

export interface SiteStyleConfig {
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-components",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-components.mjs",
"types": "./dist/ts-components.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-css",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-css.mjs",
"types": "./dist/ts-css.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-highlight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-highlight",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-highlight.mjs",
"types": "./dist/ts-highlight.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-html",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-html.mjs",
"types": "./dist/ts-html.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-images/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-images",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-images.mjs",
"types": "./dist/ts-images.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-minidom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-minidom",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-minidom.mjs",
"types": "./dist/ts-minidom.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-page-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-page-scripts",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-page-scripts.mjs",
"types": "./dist/ts-page-scripts.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-pagefind/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-pagefind",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-pagefind.mjs",
"types": "./dist/ts-pagefind.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-render/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-render",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-render.mjs",
"types": "./dist/ts-render.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-seo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-seo",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-seo.mjs",
"types": "./dist/ts-seo.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-ssg-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "purestack-component-navigation",
"displayName": "PureStack Component Tools",
"description": "Component navigation, prop IntelliSense, lit-html syntax highlighting, and template formatting for Markdown, Regor MDX, and TypeScript templates.",
"version": "1.1.18",
"version": "1.1.19",
"private": true,
"publisher": "purestack",
"license": "MIT",
Expand Down
12 changes: 12 additions & 0 deletions packages/ts-ssg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,18 @@ Add your own Regor components with a plugin's `components` field. A component re

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`.

TypeScript page scripts share Regor automatically, including imports from their component dependencies. Add other browser ESM libraries through `scripts.sharedLibraries` in `siteConfig.json`:

```json
{
"scripts": {
"sharedLibraries": ["my-library", "my-library/extra"]
}
}
```

List exact package import specifiers, including any subpaths used by page scripts. Regor is always included. Shared entries build together so their common dependencies also share one module instance. Generated modules live under `assets/runtime/` with content-hashed filenames; their URLs stay the same when only a page script changes. Page scripts continue to build independently.

## Theming

The built-in skin is `standard`. Select a skin with `style.theme.skin` in `siteConfig.json`.
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-ssg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purestack/ts-ssg",
"version": "1.1.18",
"version": "1.1.19",
"packageManager": "yarn@4.9.2",
"module": "./dist/ts-ssg.mjs",
"types": "./dist/ts-ssg.d.mts",
Expand Down
9 changes: 9 additions & 0 deletions packages/ts-ssg/schema/siteConfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,15 @@
"type": "boolean",
"description": "When true, emitted local TypeScript script filenames include a build cache key so browsers fetch fresh bundles after rebuilds.",
"default": true
},
"sharedLibraries": {
"type": "array",
"description": "Package import specifiers emitted together as shared browser modules under assets/runtime. List subpath imports explicitly. Regor is always included.",
"items": {
"type": "string",
"pattern": "^(?:@[\\w~-]+/)?[\\w~-][\\w.~-]*(?:/[\\w~-][\\w.~-]*)*$"
},
"default": ["regor"]
}
}
},
Expand Down
Loading
Loading