@sigx/ssg 0.3.2 β 0.4.2
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/LICENSE +21 -21
- package/README.md +199 -358
- package/dist/build-DP9zez3B.js.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/errors.d.ts +11 -11
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mdx/rehype-headings.d.ts.map +1 -1
- package/dist/mdx/shiki.d.ts.map +1 -1
- package/dist/plugin-EIAzPLvE.js.map +1 -1
- package/dist/plugin.d.ts +9 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +99 -0
- package/dist/plugin.js.map +1 -0
- package/dist/virtual-entries-CH-0HuqJ.js.map +1 -1
- package/dist/vite/plugin.d.ts.map +1 -1
- package/package.json +24 -14
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -2357
- package/dist/cli.js.map +0 -7
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Andreas Ekdahl
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Andreas Ekdahl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,358 +1,199 @@
|
|
|
1
|
-
# @sigx/ssg
|
|
2
|
-
|
|
3
|
-
Static
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- π **File-based routing**
|
|
8
|
-
- π **Layout system**
|
|
9
|
-
- π **MDX
|
|
10
|
-
- π¨ **Pluggable themes**
|
|
11
|
-
-
|
|
12
|
-
- β‘ **Fast builds**
|
|
13
|
-
- π **Zero-config mode**
|
|
14
|
-
- πΊοΈ **Sitemap generation**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
npm install
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
```ts
|
|
202
|
-
export default defineSSGConfig({
|
|
203
|
-
theme: '@sigx/ssg-theme-daisyui',
|
|
204
|
-
});
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Themes provide:
|
|
208
|
-
- Pre-built layouts (default, docs, blog, etc.)
|
|
209
|
-
- UI components
|
|
210
|
-
- CSS styles
|
|
211
|
-
|
|
212
|
-
## Hydration
|
|
213
|
-
|
|
214
|
-
SSG pages are pre-rendered at build time as static HTML. Interactive components are "hydrated" on the client side to become reactive.
|
|
215
|
-
|
|
216
|
-
### Islands Architecture
|
|
217
|
-
|
|
218
|
-
SignalX SSG supports selective hydration through **islands architecture**. Each interactive component can specify when it should be hydrated using client directives:
|
|
219
|
-
|
|
220
|
-
```tsx
|
|
221
|
-
import { Counter } from './components/Counter';
|
|
222
|
-
|
|
223
|
-
export default component(() => {
|
|
224
|
-
return () => (
|
|
225
|
-
<div>
|
|
226
|
-
{/* Static content - no JS needed */}
|
|
227
|
-
<h1>Welcome to my site</h1>
|
|
228
|
-
|
|
229
|
-
{/* Interactive islands with different hydration strategies */}
|
|
230
|
-
<Counter client:load />
|
|
231
|
-
<LazyWidget client:idle />
|
|
232
|
-
<OffscreenChart client:visible />
|
|
233
|
-
<MobileMenu client:media="(max-width: 768px)" />
|
|
234
|
-
<BrowserOnlyWidget client:only />
|
|
235
|
-
</div>
|
|
236
|
-
);
|
|
237
|
-
});
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Hydration Strategies
|
|
241
|
-
|
|
242
|
-
| Directive | When it Hydrates | Use Case |
|
|
243
|
-
|-----------|------------------|----------|
|
|
244
|
-
| `client:load` | Immediately on page load | Critical interactive elements |
|
|
245
|
-
| `client:idle` | When browser is idle (`requestIdleCallback`) | Non-critical interactivity |
|
|
246
|
-
| `client:visible` | When scrolled into viewport (`IntersectionObserver`) | Below-the-fold components |
|
|
247
|
-
| `client:media="query"` | When media query matches | Mobile-only components |
|
|
248
|
-
| `client:only` | Not SSR'd, renders only on client | Browser API dependencies |
|
|
249
|
-
|
|
250
|
-
### Example: Interactive Counter
|
|
251
|
-
|
|
252
|
-
```tsx
|
|
253
|
-
// src/components/Counter.tsx
|
|
254
|
-
import { component, signal } from 'sigx';
|
|
255
|
-
|
|
256
|
-
export const Counter = component(() => {
|
|
257
|
-
const count = signal(0);
|
|
258
|
-
|
|
259
|
-
return () => (
|
|
260
|
-
<div class="counter">
|
|
261
|
-
<button onClick={() => count.value--}>-</button>
|
|
262
|
-
<span>{count.value}</span>
|
|
263
|
-
<button onClick={() => count.value++}>+</button>
|
|
264
|
-
</div>
|
|
265
|
-
);
|
|
266
|
-
}, { name: 'Counter' });
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
```tsx
|
|
270
|
-
// src/pages/index.tsx
|
|
271
|
-
import { Counter } from '../components/Counter';
|
|
272
|
-
|
|
273
|
-
export default component(() => {
|
|
274
|
-
return () => (
|
|
275
|
-
<main>
|
|
276
|
-
<h1>Counter Demo</h1>
|
|
277
|
-
<Counter client:load />
|
|
278
|
-
</main>
|
|
279
|
-
);
|
|
280
|
-
});
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### How It Works
|
|
284
|
-
|
|
285
|
-
1. **Build time**: Pages are rendered to static HTML with component markers
|
|
286
|
-
2. **Page load**: Browser receives pre-rendered HTML (fast First Contentful Paint)
|
|
287
|
-
3. **Hydration**: JavaScript attaches event handlers and reactivity to existing DOM
|
|
288
|
-
4. **Interactivity**: Components become fully interactive without re-rendering
|
|
289
|
-
|
|
290
|
-
### Benefits
|
|
291
|
-
|
|
292
|
-
- **Fast initial load** - HTML is ready immediately, no JavaScript blocking
|
|
293
|
-
- **SEO friendly** - Search engines see full content
|
|
294
|
-
- **Progressive enhancement** - Content is visible before JS loads
|
|
295
|
-
- **Reduced JavaScript** - Only hydrate what needs to be interactive
|
|
296
|
-
- **Fine-grained control** - Choose when each component becomes interactive
|
|
297
|
-
|
|
298
|
-
## Configuration
|
|
299
|
-
|
|
300
|
-
Full configuration options:
|
|
301
|
-
|
|
302
|
-
```ts
|
|
303
|
-
defineSSGConfig({
|
|
304
|
-
// Directories
|
|
305
|
-
pages: 'src/pages',
|
|
306
|
-
layouts: 'src/layouts',
|
|
307
|
-
content: 'src/content',
|
|
308
|
-
outDir: 'dist',
|
|
309
|
-
|
|
310
|
-
// Site metadata
|
|
311
|
-
site: {
|
|
312
|
-
title: 'My Site',
|
|
313
|
-
description: 'Site description',
|
|
314
|
-
url: 'https://example.com',
|
|
315
|
-
lang: 'en',
|
|
316
|
-
favicon: '/favicon.ico',
|
|
317
|
-
fonts: ['Inter:wght@400;500;600;700'],
|
|
318
|
-
ogImage: 'https://example.com/og.png',
|
|
319
|
-
twitter: 'myhandle',
|
|
320
|
-
themeColor: '#000000',
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
// Theme
|
|
324
|
-
theme: '@sigx/ssg-theme-daisyui',
|
|
325
|
-
defaultLayout: 'default',
|
|
326
|
-
|
|
327
|
-
// Markdown options
|
|
328
|
-
markdown: {
|
|
329
|
-
shiki: {
|
|
330
|
-
light: 'github-light',
|
|
331
|
-
dark: 'github-dark',
|
|
332
|
-
},
|
|
333
|
-
},
|
|
334
|
-
});
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
## CLI
|
|
338
|
-
|
|
339
|
-
```bash
|
|
340
|
-
# Start development server
|
|
341
|
-
npx ssg dev
|
|
342
|
-
|
|
343
|
-
# Build static site (generates sitemap.xml and robots.txt)
|
|
344
|
-
npx ssg build
|
|
345
|
-
|
|
346
|
-
# Preview production build
|
|
347
|
-
npx ssg preview
|
|
348
|
-
|
|
349
|
-
# With custom config
|
|
350
|
-
npx ssg build --config=./my-config.ts
|
|
351
|
-
|
|
352
|
-
# With options
|
|
353
|
-
npx ssg dev --port=3000 --open
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
## License
|
|
357
|
-
|
|
358
|
-
MIT
|
|
1
|
+
# @sigx/ssg
|
|
2
|
+
|
|
3
|
+
Static site generator for [SignalX](https://github.com/signalxjs/core) with file-based routing, MDX, and pluggable themes.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- π **File-based routing** β `src/pages/` becomes routes automatically
|
|
8
|
+
- π **Layout system** β wrap pages with reusable layouts
|
|
9
|
+
- π **MDX** β write content with Markdown + SignalX components
|
|
10
|
+
- π¨ **Pluggable themes** β install a theme package (e.g. `@sigx/ssg-theme-daisyui`) or build your own
|
|
11
|
+
- π₯ **Vite HMR** β instant updates during development
|
|
12
|
+
- β‘ **Fast builds** β parallel rendering with streaming
|
|
13
|
+
- π **Zero-config mode** β works out of the box with sensible defaults
|
|
14
|
+
- πΊοΈ **Sitemap generation** β automatic `sitemap.xml` and `robots.txt`
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @sigx/ssg sigx @sigx/router
|
|
20
|
+
npm install -D vite @sigx/vite
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
`@sigx/ssg` ships as a [`@sigx/cli`](https://github.com/signalxjs/cli) plugin and a Vite plugin you can use directly. Drop a `ssg.config.ts` in your project root to opt in:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// ssg.config.ts
|
|
29
|
+
import { defineSSGConfig } from '@sigx/ssg';
|
|
30
|
+
|
|
31
|
+
export default defineSSGConfig({
|
|
32
|
+
site: {
|
|
33
|
+
title: 'My Site',
|
|
34
|
+
description: 'Built with SignalX SSG',
|
|
35
|
+
url: 'https://example.com',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Via `@sigx/cli`
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx sigx ssg dev # start dev server
|
|
44
|
+
npx sigx ssg build # build static site
|
|
45
|
+
npx sigx ssg preview # preview the production build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Via the Vite plugin
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
// vite.config.ts
|
|
52
|
+
import { defineConfig } from 'vite';
|
|
53
|
+
import sigx from '@sigx/vite';
|
|
54
|
+
import ssg from '@sigx/ssg/vite';
|
|
55
|
+
|
|
56
|
+
export default defineConfig({
|
|
57
|
+
plugins: [sigx(), ssg()],
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## File-based routing
|
|
62
|
+
|
|
63
|
+
Pages in `src/pages/` are automatically converted to routes:
|
|
64
|
+
|
|
65
|
+
| File | Route |
|
|
66
|
+
|------|-------|
|
|
67
|
+
| `src/pages/index.tsx` | `/` |
|
|
68
|
+
| `src/pages/about.tsx` | `/about` |
|
|
69
|
+
| `src/pages/blog/index.tsx` | `/blog` |
|
|
70
|
+
| `src/pages/blog/[slug].tsx` | `/blog/:slug` |
|
|
71
|
+
| `src/pages/docs/[...path].tsx` | `/docs/*path` |
|
|
72
|
+
|
|
73
|
+
Dynamic routes export `getStaticPaths`:
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
// src/pages/blog/[slug].tsx
|
|
77
|
+
import { component } from 'sigx';
|
|
78
|
+
|
|
79
|
+
export async function getStaticPaths() {
|
|
80
|
+
const posts = await fetchBlogPosts();
|
|
81
|
+
return posts.map(post => ({
|
|
82
|
+
params: { slug: post.slug },
|
|
83
|
+
props: { post },
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export default component(({ props }) => () => (
|
|
88
|
+
<article>
|
|
89
|
+
<h1>{props.post.title}</h1>
|
|
90
|
+
</article>
|
|
91
|
+
));
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Layouts
|
|
95
|
+
|
|
96
|
+
Create layouts in `src/layouts/`:
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
// src/layouts/default.tsx
|
|
100
|
+
import { component } from 'sigx';
|
|
101
|
+
|
|
102
|
+
export default component(({ slots }) => () => (
|
|
103
|
+
<div class="layout">
|
|
104
|
+
<header><nav>My Site</nav></header>
|
|
105
|
+
<main>{slots.default()}</main>
|
|
106
|
+
<footer>Β©</footer>
|
|
107
|
+
</div>
|
|
108
|
+
));
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Specify the layout in frontmatter or by exporting it:
|
|
112
|
+
|
|
113
|
+
```mdx
|
|
114
|
+
---
|
|
115
|
+
title: My Page
|
|
116
|
+
layout: docs
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
# Content here
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
export const layout = 'docs';
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## MDX
|
|
127
|
+
|
|
128
|
+
```mdx
|
|
129
|
+
---
|
|
130
|
+
title: Hello World
|
|
131
|
+
date: 2026-05-10
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# {frontmatter.title}
|
|
135
|
+
|
|
136
|
+
This is **markdown** with SignalX components mixed in:
|
|
137
|
+
|
|
138
|
+
<Counter initial={5} />
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Themes
|
|
142
|
+
|
|
143
|
+
Install a theme:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npm install @sigx/ssg-theme-daisyui
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
// ssg.config.ts
|
|
151
|
+
export default defineSSGConfig({
|
|
152
|
+
theme: '@sigx/ssg-theme-daisyui',
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
A theme bundles layouts, components, and CSS so you don't have to.
|
|
157
|
+
|
|
158
|
+
## Islands hydration
|
|
159
|
+
|
|
160
|
+
`@sigx/ssg` works with [`@sigx/ssr-islands`](https://github.com/signalxjs/ssr-islands) for selective hydration via `client:*` directives. See the islands README for details.
|
|
161
|
+
|
|
162
|
+
## Configuration
|
|
163
|
+
|
|
164
|
+
Full options:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
defineSSGConfig({
|
|
168
|
+
pages: 'src/pages',
|
|
169
|
+
layouts: 'src/layouts',
|
|
170
|
+
content: 'src/content',
|
|
171
|
+
outDir: 'dist',
|
|
172
|
+
|
|
173
|
+
site: {
|
|
174
|
+
title: 'My Site',
|
|
175
|
+
description: 'Site description',
|
|
176
|
+
url: 'https://example.com',
|
|
177
|
+
lang: 'en',
|
|
178
|
+
favicon: '/favicon.ico',
|
|
179
|
+
fonts: ['Inter:wght@400;500;600;700'],
|
|
180
|
+
ogImage: 'https://example.com/og.png',
|
|
181
|
+
twitter: 'myhandle',
|
|
182
|
+
themeColor: '#000000',
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
theme: '@sigx/ssg-theme-daisyui',
|
|
186
|
+
defaultLayout: 'default',
|
|
187
|
+
|
|
188
|
+
markdown: {
|
|
189
|
+
shiki: {
|
|
190
|
+
light: 'github-light',
|
|
191
|
+
dark: 'github-dark',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
MIT Β© Andreas Ekdahl
|