|
1 | 1 | /// <reference types="vitepress" /> |
2 | 2 | /// <reference types="vite/client" /> |
| 3 | + |
| 4 | +import { createTwoslashWithInlineCache } from '@shikijs/vitepress-twoslash/cache-inline' |
3 | 5 | import { defineConfig } from 'vitepress' |
4 | 6 |
|
5 | 7 | const guideSidebar = [ |
@@ -35,34 +37,41 @@ const blocksSidebar = [ |
35 | 37 | }, |
36 | 38 | ] |
37 | 39 |
|
38 | | -export default defineConfig({ |
39 | | - title: 'Hikkaku', |
40 | | - description: 'Write Scratch projects in TypeScript', |
41 | | - lang: 'en-US', |
42 | | - base: '/hikkaku/', |
43 | | - themeConfig: { |
44 | | - nav: [ |
45 | | - { text: 'Guide', link: '/guides/' }, |
46 | | - { text: 'Reference', link: '/reference/' }, |
47 | | - { text: 'Playground', link: '/playground' }, |
48 | | - { text: 'GitHub', link: 'https://github.com/pnsk-lab/hikkaku' }, |
49 | | - ], |
50 | | - sidebar: { |
51 | | - '/guides/': guideSidebar, |
52 | | - '/reference/': [ |
53 | | - { |
54 | | - text: 'Reference', |
55 | | - items: [{ text: 'Overview', link: '/reference/' }], |
56 | | - }, |
57 | | - ...blocksSidebar, |
58 | | - ], |
59 | | - }, |
60 | | - search: { |
61 | | - provider: 'local', |
| 40 | +const withTwoslashInlineCache = createTwoslashWithInlineCache({}) |
| 41 | + |
| 42 | +export default withTwoslashInlineCache( |
| 43 | + defineConfig({ |
| 44 | + title: 'Hikkaku', |
| 45 | + description: 'Write Scratch projects in TypeScript', |
| 46 | + lang: 'en-US', |
| 47 | + base: '/hikkaku/', |
| 48 | + markdown: { |
| 49 | + codeTransformers: [], |
62 | 50 | }, |
63 | | - logo: { |
64 | | - src: '/assets/logo.svg', |
65 | | - alt: 'Hikkaku Logo', |
| 51 | + themeConfig: { |
| 52 | + nav: [ |
| 53 | + { text: 'Guide', link: '/guides/' }, |
| 54 | + { text: 'Reference', link: '/reference/' }, |
| 55 | + { text: 'Playground', link: '/playground' }, |
| 56 | + { text: 'GitHub', link: 'https://github.com/pnsk-lab/hikkaku' }, |
| 57 | + ], |
| 58 | + sidebar: { |
| 59 | + '/guides/': guideSidebar, |
| 60 | + '/reference/': [ |
| 61 | + { |
| 62 | + text: 'Reference', |
| 63 | + items: [{ text: 'Overview', link: '/reference/' }], |
| 64 | + }, |
| 65 | + ...blocksSidebar, |
| 66 | + ], |
| 67 | + }, |
| 68 | + search: { |
| 69 | + provider: 'local', |
| 70 | + }, |
| 71 | + logo: { |
| 72 | + src: '/assets/logo.svg', |
| 73 | + alt: 'Hikkaku Logo', |
| 74 | + }, |
66 | 75 | }, |
67 | | - }, |
68 | | -}) |
| 76 | + }), |
| 77 | +) |
0 commit comments