@umami/shiso 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/bin/shiso.mjs +9 -1
- package/config.js +8 -0
- package/dist/chunks/App.js +255 -73
- package/dist/chunks/local.js +1 -62
- package/dist/chunks/search.js +64 -0
- package/dist/entry-client.js +1 -1
- package/dist/entry-server.js +16 -5
- package/docs.schema.json +29 -26
- package/package.json +8 -2
- package/scripts/build-runtime.mjs +1 -0
- package/scripts/generate-search-index.mjs +4 -3
- package/scripts/load-shiso-config.mjs +167 -0
- package/scripts/prerender.mjs +4 -2
- package/scripts/validate-config.mjs +23 -10
- package/scripts/vite-docs-config.mjs +52 -13
- package/src/App.tsx +13 -6
- package/src/components/DocContent.tsx +5 -3
- package/src/components/Header.tsx +61 -24
- package/src/components/Search.tsx +14 -3
- package/src/components/TopNav.tsx +9 -7
- package/src/components/docs/Button.tsx +67 -0
- package/src/components/docs/PropertiesTable.tsx +4 -4
- package/src/components/docs/index.ts +1 -0
- package/src/declarations.d.ts +7 -0
- package/src/entry-server.tsx +20 -3
- package/src/lib/content.ts +10 -2
- package/src/lib/head.ts +15 -7
- package/src/lib/locale.ts +1 -1
- package/src/lib/paths.ts +11 -7
- package/src/lib/site-config.ts +21 -3
- package/src/lib/site-model.ts +7 -2
- package/src/lib/standalone-pages.ts +129 -0
- package/src/lib/types.ts +33 -3
- package/src/pages/StandalonePage.tsx +42 -0
- package/src/styles/global.css +19 -1
- package/src/styles/tokens.css +1 -1
- package/types/config.d.ts +19 -0
- package/vite.config.ts +58 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to `@umami/shiso` are documented here. This project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 2.0.0 - 2026-08-21
|
|
7
|
+
|
|
8
|
+
### Breaking
|
|
9
|
+
|
|
10
|
+
- Move project settings (`docsPrefix`, `contentDir`, `siteUrl`, `locale`) from
|
|
11
|
+
the `$shiso` key in docs.json to a new optional `shiso.config.ts` file at the
|
|
12
|
+
project root. `shiso check` now rejects docs.json files that still contain
|
|
13
|
+
`$shiso` with a migration message.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- New `@umami/shiso/config` export providing `defineConfig` and the
|
|
18
|
+
`ShisoConfig` type for shiso.config.ts.
|
|
19
|
+
- `shiso.config.ts`, `shiso.config.mjs`, and `shiso.config.js` are supported;
|
|
20
|
+
the file is optional and defaults apply when absent. Config edits (and
|
|
21
|
+
creating the file) hot-reload during development.
|
|
22
|
+
|
|
6
23
|
## 1.1.11 - 2026-08-19
|
|
7
24
|
|
|
8
25
|
### Changed
|
package/bin/shiso.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import fs from 'node:fs/promises';
|
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import process from 'node:process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { loadShisoConfig } from '../scripts/load-shiso-config.mjs';
|
|
8
9
|
import { validateProject } from '../scripts/validate-config.mjs';
|
|
9
10
|
|
|
10
11
|
const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
@@ -22,7 +23,7 @@ Commands:
|
|
|
22
23
|
dev Start the development server
|
|
23
24
|
build Validate and build the static site
|
|
24
25
|
preview Preview the production build
|
|
25
|
-
check Validate docs.json
|
|
26
|
+
check Validate docs.json and shiso.config
|
|
26
27
|
|
|
27
28
|
Options after dev, build, or preview are passed to Vite.
|
|
28
29
|
`;
|
|
@@ -55,6 +56,13 @@ async function check(projectRoot) {
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
console.log('docs.json is valid.');
|
|
59
|
+
|
|
60
|
+
// Fails fast on a broken shiso.config.* before any Vite build starts.
|
|
61
|
+
const shiso = await loadShisoConfig({ root: projectRoot });
|
|
62
|
+
|
|
63
|
+
if (shiso.sourcePath) {
|
|
64
|
+
console.log(`${path.basename(shiso.sourcePath)} loaded.`);
|
|
65
|
+
}
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
async function main() {
|
package/config.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity helper that gives shiso.config.ts typing today and room for future
|
|
3
|
+
* config forms (functions, plugins) without another migration. Ships as plain
|
|
4
|
+
* JS so it resolves under Node and jiti with no build step or dependencies.
|
|
5
|
+
*/
|
|
6
|
+
export function defineConfig(config) {
|
|
7
|
+
return config;
|
|
8
|
+
}
|