|
1 | | -import type * as Preset from '@docusaurus/preset-classic'; |
2 | | -import type { Config } from '@docusaurus/types'; |
3 | | -import { themes as prismThemes } from 'prism-react-renderer'; |
| 1 | +import type * as Preset from "@docusaurus/preset-classic"; |
| 2 | +import type { Config } from "@docusaurus/types"; |
| 3 | +import { themes as prismThemes } from "prism-react-renderer"; |
4 | 4 |
|
5 | 5 | // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) |
6 | 6 |
|
7 | 7 | const config: Config = { |
8 | | - title: 'Vue Shiki Monaco Editor', |
9 | | - tagline: '基于 Monaco Editor + Shiki 的现代化 Vue 3 代码编辑器组件', |
10 | | - favicon: 'img/favicon.ico', |
| 8 | + title: "Vue Shiki Monaco Editor", |
| 9 | + tagline: "基于 Monaco Editor + Shiki 的现代化 Vue 3 代码编辑器组件", |
| 10 | + favicon: "img/favicon.ico", |
11 | 11 |
|
12 | 12 | // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future |
13 | 13 | future: { |
14 | 14 | v4: true, // Improve compatibility with the upcoming Docusaurus v4 |
15 | 15 | }, |
16 | 16 |
|
17 | 17 | // Set the production url of your site here |
18 | | - url: 'https://lisentowind.github.io', |
| 18 | + url: "https://lisentowind.github.io", |
19 | 19 | // Set the /<baseUrl>/ pathname under which your site is served |
20 | 20 | // For GitHub pages deployment, it is often '/<projectName>/' |
21 | | - baseUrl: '/vue-shiki-monaco/', |
| 21 | + baseUrl: "/vue-shiki-monaco/", |
22 | 22 |
|
23 | 23 | // GitHub pages deployment config. |
24 | 24 | // If you aren't using GitHub pages, you don't need these. |
25 | | - organizationName: 'lisentowind', // Usually your GitHub org/user name. |
26 | | - projectName: 'vue-shiki-monaco', // Usually your repo name. |
| 25 | + organizationName: "lisentowind", // Usually your GitHub org/user name. |
| 26 | + projectName: "vue-shiki-monaco", // Usually your repo name. |
27 | 27 |
|
28 | | - onBrokenLinks: 'throw', |
29 | | - onBrokenMarkdownLinks: 'warn', |
| 28 | + onBrokenLinks: "throw", |
| 29 | + onBrokenMarkdownLinks: "warn", |
30 | 30 |
|
31 | 31 | // Even if you don't use internationalization, you can use this field to set |
32 | 32 | // useful metadata like html lang. For example, if your site is Chinese, you |
33 | 33 | // may want to replace "en" with "zh-Hans". |
34 | 34 | i18n: { |
35 | | - defaultLocale: 'zh-Hans', |
36 | | - locales: ['zh-Hans', 'en'], |
| 35 | + defaultLocale: "zh-Hans", |
| 36 | + locales: ["zh-Hans", "en"], |
37 | 37 | localeConfigs: { |
38 | | - 'zh-Hans': { |
39 | | - label: '简体中文', |
40 | | - direction: 'ltr', |
41 | | - htmlLang: 'zh-CN', |
| 38 | + "zh-Hans": { |
| 39 | + label: "简体中文", |
| 40 | + direction: "ltr", |
| 41 | + htmlLang: "zh-CN", |
42 | 42 | }, |
43 | | - 'en': { |
44 | | - label: 'English', |
45 | | - direction: 'ltr', |
46 | | - htmlLang: 'en-US', |
| 43 | + en: { |
| 44 | + label: "English", |
| 45 | + direction: "ltr", |
| 46 | + htmlLang: "en-US", |
47 | 47 | }, |
48 | 48 | }, |
49 | 49 | }, |
50 | 50 |
|
51 | 51 | presets: [ |
52 | 52 | [ |
53 | | - 'classic', |
| 53 | + "classic", |
54 | 54 | { |
55 | 55 | docs: { |
56 | | - sidebarPath: './sidebars.ts', |
57 | | - editUrl: 'https://github.com/lisentowind/vue-shiki-monaco/edit/main/apps/docs/', |
58 | | - routeBasePath: 'docs', |
| 56 | + sidebarPath: "./sidebars.ts", |
| 57 | + editUrl: |
| 58 | + "https://github.com/lisentowind/vue-shiki-monaco/edit/main/apps/docs/", |
| 59 | + routeBasePath: "docs", |
59 | 60 | }, |
60 | 61 | blog: { |
61 | 62 | showReadingTime: true, |
62 | 63 | feedOptions: { |
63 | | - type: ['rss', 'atom'], |
| 64 | + type: ["rss", "atom"], |
64 | 65 | xslt: true, |
65 | 66 | }, |
66 | 67 | // Please change this to your repo. |
67 | 68 | // Remove this to remove the "edit this page" links. |
68 | 69 | editUrl: |
69 | | - 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', |
| 70 | + "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/", |
70 | 71 | // Useful options to enforce blogging best practices |
71 | | - onInlineTags: 'warn', |
72 | | - onInlineAuthors: 'warn', |
73 | | - onUntruncatedBlogPosts: 'warn', |
| 72 | + onInlineTags: "warn", |
| 73 | + onInlineAuthors: "warn", |
| 74 | + onUntruncatedBlogPosts: "warn", |
74 | 75 | }, |
75 | 76 | theme: { |
76 | | - customCss: './src/css/custom.css', |
| 77 | + customCss: "./src/css/custom.css", |
77 | 78 | }, |
78 | 79 | } satisfies Preset.Options, |
79 | 80 | ], |
80 | 81 | ], |
81 | 82 |
|
82 | 83 | themeConfig: { |
83 | 84 | // Replace with your project's social card |
84 | | - image: 'img/docusaurus-social-card.jpg', |
| 85 | + image: "img/docusaurus-social-card.jpg", |
85 | 86 | navbar: { |
86 | | - title: 'Vue Shiki Monaco Editor ', |
| 87 | + title: "Vue Shiki Monaco Editor ", |
87 | 88 | logo: { |
88 | | - alt: 'Vue Shiki Monaco Editor Logo', |
89 | | - src: 'img/logo.svg', |
| 89 | + alt: "Vue Shiki Monaco Editor Logo", |
| 90 | + src: "img/logo.png", |
90 | 91 | }, |
91 | 92 | items: [ |
92 | 93 | { |
93 | | - type: 'docSidebar', |
94 | | - sidebarId: 'tutorialSidebar', |
95 | | - position: 'left', |
96 | | - label: '文档', |
| 94 | + type: "docSidebar", |
| 95 | + sidebarId: "tutorialSidebar", |
| 96 | + position: "left", |
| 97 | + label: "文档", |
97 | 98 | }, |
98 | 99 | { |
99 | | - type: 'localeDropdown', |
100 | | - position: 'right', |
| 100 | + type: "localeDropdown", |
| 101 | + position: "right", |
101 | 102 | }, |
102 | 103 | { |
103 | | - href: 'https://github.com/lisentowind/vue-shiki-monaco', |
104 | | - label: 'GitHub', |
105 | | - position: 'right', |
| 104 | + href: "https://github.com/lisentowind/vue-shiki-monaco", |
| 105 | + label: "GitHub", |
| 106 | + position: "right", |
106 | 107 | }, |
107 | 108 | ], |
108 | 109 | }, |
109 | 110 | footer: { |
110 | | - style: 'dark', |
| 111 | + style: "dark", |
111 | 112 | links: [ |
112 | 113 | { |
113 | | - title: '文档', |
| 114 | + title: "文档", |
114 | 115 | items: [ |
115 | 116 | { |
116 | | - label: '快速开始', |
117 | | - to: '/docs/getting-started', |
| 117 | + label: "快速开始", |
| 118 | + to: "/docs/getting-started", |
118 | 119 | }, |
119 | 120 | { |
120 | | - label: 'API 参考', |
121 | | - to: '/docs/api', |
| 121 | + label: "API 参考", |
| 122 | + to: "/docs/api", |
122 | 123 | }, |
123 | 124 | { |
124 | | - label: '使用示例', |
125 | | - to: '/docs/examples', |
| 125 | + label: "使用示例", |
| 126 | + to: "/docs/examples", |
126 | 127 | }, |
127 | 128 | ], |
128 | 129 | }, |
129 | 130 | { |
130 | | - title: '社区', |
| 131 | + title: "社区", |
131 | 132 | items: [ |
132 | 133 | { |
133 | | - label: 'GitHub Issues', |
134 | | - href: 'https://github.com/lisentowind/vue-shiki-monaco/issues', |
| 134 | + label: "GitHub Issues", |
| 135 | + href: "https://github.com/lisentowind/vue-shiki-monaco/issues", |
135 | 136 | }, |
136 | 137 | { |
137 | | - label: 'GitHub Discussions', |
138 | | - href: 'https://github.com/lisentowind/vue-shiki-monaco/discussions', |
| 138 | + label: "GitHub Discussions", |
| 139 | + href: "https://github.com/lisentowind/vue-shiki-monaco/discussions", |
139 | 140 | }, |
140 | 141 | ], |
141 | 142 | }, |
142 | 143 | { |
143 | | - title: '更多', |
| 144 | + title: "更多", |
144 | 145 | items: [ |
145 | 146 | { |
146 | | - label: 'GitHub', |
147 | | - href: 'https://github.com/lisentowind/vue-shiki-monaco', |
| 147 | + label: "GitHub", |
| 148 | + href: "https://github.com/lisentowind/vue-shiki-monaco", |
148 | 149 | }, |
149 | 150 | { |
150 | | - label: 'NPM', |
151 | | - href: 'https://www.npmjs.com/package/vue-shiki-monaco', |
| 151 | + label: "NPM", |
| 152 | + href: "https://www.npmjs.com/package/vue-shiki-monaco", |
152 | 153 | }, |
153 | 154 | ], |
154 | 155 | }, |
|
0 commit comments