Skip to content

Commit 40d7ea7

Browse files
rsbhclaude
andauthored
feat: public dir support, logo and content icon config (#54)
* feat: add public dir support and logo config for default theme Serve static assets from project's public/ directory via Vite publicDir and Nitro publicAssets. Update basic example to use default theme with logo configuration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add content dir icon to basic example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ed3d944 commit 40d7ea7

4 files changed

Lines changed: 16 additions & 1 deletion

File tree

examples/basic/chronicle.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ site:
44

55
url: https://docs.example.com
66

7+
logo:
8+
light: /logo.svg
9+
dark: /logo.svg
10+
711
content:
812
- dir: docs
913
label: Docs
14+
icon: /icons/docs.svg
1015

1116
theme:
12-
name: paper
17+
name: default
1318

1419
search:
1520
enabled: true
Lines changed: 4 additions & 0 deletions
Loading

examples/basic/public/logo.svg

Lines changed: 4 additions & 0 deletions
Loading

packages/chronicle/src/server/vite-config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export async function createViteConfig(
4848

4949
return {
5050
root: packageRoot,
51+
publicDir: path.resolve(projectRoot, 'public'),
5152
configFile: false,
5253
plugins: [
5354
nitro({
@@ -131,6 +132,7 @@ export async function createViteConfig(
131132
},
132133
nitro: {
133134
logLevel: 2,
135+
publicAssets: [{ dir: path.resolve(projectRoot, 'public') }],
134136
output: {
135137
dir: resolveOutputDir(projectRoot, preset),
136138
},

0 commit comments

Comments
 (0)