|
1 | | -import {themes as prismThemes} from 'prism-react-renderer'; |
2 | | -import type {Config} from '@docusaurus/types'; |
3 | | -import type * as Preset from '@docusaurus/preset-classic'; |
| 1 | +import { themes as prismThemes } from "prism-react-renderer"; |
| 2 | +import type { Config } from "@docusaurus/types"; |
| 3 | +import type * as Preset from "@docusaurus/preset-classic"; |
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: 'Viglet Documentation', |
9 | | - tagline: 'Documentation about Viglet Products.', |
10 | | - favicon: 'img/favicon.ico', |
| 8 | + title: "Viglet Documentation", |
| 9 | + tagline: "Documentation about Viglet Products.", |
| 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://docs-react.viglet.com', |
| 18 | + url: "https://docs-react.viglet.com", |
19 | 19 | // Set the /<baseUrl>/ pathname under which your site is served |
20 | 20 | // For GitHub pages deployment, it is often '/<projectName>/' |
21 | | - baseUrl: '/', |
22 | | - |
| 21 | + baseUrl: "/", |
| 22 | + |
23 | 23 | trailingSlash: false, |
24 | 24 | // GitHub pages deployment config. |
25 | 25 | // If you aren't using GitHub pages, you don't need these. |
26 | | - organizationName: 'openviglet', // Usually your GitHub org/user name. |
27 | | - projectName: 'docs-react', // Usually your repo name. |
| 26 | + organizationName: "openviglet", // Usually your GitHub org/user name. |
| 27 | + projectName: "docs-react", // Usually your repo name. |
28 | 28 |
|
29 | | - onBrokenLinks: 'warn', |
30 | | - onBrokenMarkdownLinks: 'warn', |
| 29 | + onBrokenLinks: "warn", |
| 30 | + |
| 31 | + markdown: { |
| 32 | + hooks: { |
| 33 | + onBrokenMarkdownLinks: "warn", |
| 34 | + }, |
| 35 | + }, |
31 | 36 |
|
32 | 37 | // Even if you don't use internationalization, you can use this field to set |
33 | 38 | // useful metadata like html lang. For example, if your site is Chinese, you |
34 | 39 | // may want to replace "en" with "zh-Hans". |
35 | 40 | i18n: { |
36 | | - defaultLocale: 'en', |
37 | | - locales: ['en'], |
| 41 | + defaultLocale: "en", |
| 42 | + locales: ["en"], |
38 | 43 | }, |
39 | 44 |
|
40 | 45 | presets: [ |
41 | 46 | [ |
42 | | - 'classic', |
| 47 | + "classic", |
43 | 48 | { |
44 | 49 | docs: { |
45 | | - sidebarPath: './sidebars.ts', |
46 | | - editUrl: |
47 | | - 'https://github.com/openviglet/docs-react/tree/main/', |
| 50 | + sidebarPath: "./sidebars.ts", |
| 51 | + editUrl: "https://github.com/openviglet/docs-react/tree/main/", |
| 52 | + versions: { |
| 53 | + current: { |
| 54 | + label: "Stable (v2025.3)", |
| 55 | + }, |
| 56 | + v0_3_9: { |
| 57 | + label: "Legacy (v0.3.9)", |
| 58 | + }, |
| 59 | + }, |
| 60 | + lastVersion: "current", |
48 | 61 | }, |
49 | 62 | blog: { |
50 | 63 | showReadingTime: true, |
51 | 64 | feedOptions: { |
52 | | - type: ['rss', 'atom'], |
| 65 | + type: ["rss", "atom"], |
53 | 66 | xslt: true, |
54 | 67 | }, |
55 | | - editUrl: |
56 | | - 'https://github.com/openviglet/docs-react/tree/main/', |
| 68 | + editUrl: "https://github.com/openviglet/docs-react/tree/main/", |
57 | 69 | // Useful options to enforce blogging best practices |
58 | | - onInlineTags: 'warn', |
59 | | - onInlineAuthors: 'warn', |
60 | | - onUntruncatedBlogPosts: 'warn', |
| 70 | + onInlineTags: "warn", |
| 71 | + onInlineAuthors: "warn", |
| 72 | + onUntruncatedBlogPosts: "warn", |
61 | 73 | }, |
62 | 74 | theme: { |
63 | | - customCss: './src/css/custom.css', |
| 75 | + customCss: "./src/css/custom.css", |
64 | 76 | }, |
65 | 77 | } satisfies Preset.Options, |
66 | 78 | ], |
67 | 79 | ], |
68 | 80 |
|
69 | 81 | themeConfig: { |
70 | 82 | // Replace with your project's social card |
71 | | - image: 'img/viglet_logo_header.png', |
| 83 | + image: "img/viglet_logo_header.png", |
72 | 84 | colorMode: { |
73 | 85 | respectPrefersColorScheme: true, |
74 | 86 | }, |
75 | 87 | navbar: { |
76 | | - title: 'Docs', |
| 88 | + title: "Docs", |
77 | 89 | logo: { |
78 | | - alt: 'Viglet Docs Logo', |
79 | | - src: 'img/viglet_logo_header.png', |
| 90 | + alt: "Viglet Docs Logo", |
| 91 | + src: "img/viglet_logo_header.png", |
80 | 92 | }, |
81 | 93 | items: [ |
82 | 94 | { |
83 | | - type: 'docSidebar', |
84 | | - sidebarId: 'tutorialSidebar', |
85 | | - position: 'left', |
86 | | - label: 'Tutorial', |
| 95 | + type: "docSidebar", |
| 96 | + sidebarId: "tutorialSidebar", |
| 97 | + position: "left", |
| 98 | + label: "Tutorial", |
87 | 99 | }, |
88 | | - {to: '/blog', label: 'Blog', position: 'left'}, |
89 | 100 | { |
90 | | - href: 'https://github.com/openviglet', |
91 | | - label: 'GitHub', |
92 | | - position: 'right', |
| 101 | + type: "docsVersionDropdown", |
| 102 | + position: "right", |
| 103 | + dropdownActiveClassDisabled: true, |
| 104 | + }, |
| 105 | + { to: "/blog", label: "Blog", position: "left" }, |
| 106 | + { |
| 107 | + href: "https://github.com/openviglet", |
| 108 | + label: "GitHub", |
| 109 | + position: "right", |
93 | 110 | }, |
94 | 111 | ], |
95 | 112 | }, |
96 | 113 | footer: { |
97 | | - style: 'dark', |
| 114 | + style: "dark", |
98 | 115 | links: [ |
99 | 116 | { |
100 | | - title: 'Docs', |
| 117 | + title: "Docs", |
101 | 118 | items: [ |
102 | 119 | { |
103 | | - label: 'Tutorial', |
104 | | - to: '/docs/intro', |
| 120 | + label: "Tutorial", |
| 121 | + to: "/docs/intro", |
105 | 122 | }, |
106 | 123 | ], |
107 | 124 | }, |
108 | 125 | { |
109 | | - title: 'Community', |
| 126 | + title: "Community", |
110 | 127 | items: [ |
111 | 128 | { |
112 | | - label: 'Stack Overflow', |
113 | | - href: 'https://stackoverflow.com/questions/tagged/viglet', |
114 | | - } |
| 129 | + label: "Stack Overflow", |
| 130 | + href: "https://stackoverflow.com/questions/tagged/viglet", |
| 131 | + }, |
115 | 132 | ], |
116 | 133 | }, |
117 | 134 | { |
118 | | - title: 'More', |
| 135 | + title: "More", |
119 | 136 | items: [ |
120 | 137 | { |
121 | | - label: 'Blog', |
122 | | - to: '/blog', |
| 138 | + label: "Blog", |
| 139 | + to: "/blog", |
123 | 140 | }, |
124 | 141 | { |
125 | | - label: 'GitHub', |
126 | | - href: 'https://github.com/openviglet', |
| 142 | + label: "GitHub", |
| 143 | + href: "https://github.com/openviglet", |
127 | 144 | }, |
128 | 145 | ], |
129 | 146 | }, |
|
0 commit comments