forked from withastro/starlight
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
40 lines (38 loc) · 1 KB
/
index.ts
File metadata and controls
40 lines (38 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { StarlightPlugin } from '@astrojs/starlight/types';
// TODO(HiDeoo) Delete this entire plugin.
export default function starlightPluginDemo(): StarlightPlugin {
return {
name: 'starlight-plugin-demo',
hooks: {
'config:setup': ({ addIntegration }) => {
addIntegration({
name: 'starlight-plugin-integration',
hooks: {
'astro:config:setup': ({ injectRoute }) => {
injectRoute({
entrypoint: 'starlight-plugin-demo/routes/5.astro',
pattern: '/tests/5',
prerender: true,
});
injectRoute({
entrypoint: 'starlight-plugin-demo/routes/6.astro',
pattern: '/tests/6',
prerender: true,
});
injectRoute({
entrypoint: 'starlight-plugin-demo/routes/7.astro',
pattern: '/tests/7',
prerender: true,
});
injectRoute({
entrypoint: 'starlight-plugin-demo/routes/8.astro',
pattern: '/tests/8',
prerender: true,
});
},
},
});
},
},
};
}