|
1 | | -import { defineConfig } from 'vitepress'; |
| 1 | +import { defineConfig } from "vitepress"; |
2 | 2 |
|
3 | | -const socialHandle = "@devhenryhale" |
4 | | -const ogUrl = 'https://mathflow.js.org'; |
| 3 | +const socialHandle = "@devhenryhale"; |
| 4 | +const ogUrl = "https://mathflow.js.org"; |
5 | 5 | const ogImage = `${ogUrl}/og-image.png`; |
6 | | -const desc = 'A lightweight and expressive scripting language designed for mathematical expressions and calculations.' |
| 6 | +const desc = |
| 7 | + "A lightweight and expressive scripting language designed for mathematical expressions and calculations."; |
7 | 8 |
|
8 | 9 | // https://vitepress.dev/reference/site-config |
9 | 10 | export default defineConfig({ |
10 | | - base: '/', |
11 | | - lang: 'en-US', |
12 | | - title: 'MathFlow', |
13 | | - description: desc, |
14 | | - head: [ |
15 | | - ['link', { rel: 'icon', href: '/logo.svg' }], |
16 | | - ['meta', { name: 'theme-color', content: '#4169e1' }], |
17 | | - ['meta', { property: 'og:type', content: 'website' }], |
18 | | - ['meta', { property: 'og:title', content: 'MathFlow' }], |
19 | | - ['meta', { property: 'og:image', content: ogImage }], |
20 | | - ['meta', { property: 'og:url', content: ogUrl }], |
21 | | - ['meta', { property: 'og:description', content: desc }], |
22 | | - ['meta', { name: 'twitter:card', content: 'summary_large_image' }], |
23 | | - ['meta', { name: 'twitter:site', content: socialHandle }], |
24 | | - ['meta', { name: 'twitter:title', content: 'MathFlow' }], |
25 | | - ['meta', { name: 'twitter:description', content: desc }], |
26 | | - ['meta', { name: 'twitter:image', content: ogImage }] |
27 | | - ], |
28 | | - themeConfig: { |
29 | | - // https://vitepress.dev/reference/default-theme-config |
30 | | - logo: '/logo.svg', |
31 | | - siteTitle: 'MathFlow', |
| 11 | + base: "/", |
| 12 | + lang: "en-US", |
| 13 | + title: "MathFlow", |
| 14 | + description: desc, |
| 15 | + head: [ |
| 16 | + ["link", { rel: "icon", href: "/logo.svg" }], |
| 17 | + ["meta", { name: "theme-color", content: "#4169e1" }], |
| 18 | + ["meta", { property: "og:type", content: "website" }], |
| 19 | + ["meta", { property: "og:title", content: "MathFlow" }], |
| 20 | + ["meta", { property: "og:image", content: ogImage }], |
| 21 | + ["meta", { property: "og:url", content: ogUrl }], |
| 22 | + ["meta", { property: "og:description", content: desc }], |
| 23 | + ["meta", { name: "twitter:card", content: "summary_large_image" }], |
| 24 | + ["meta", { name: "twitter:site", content: socialHandle }], |
| 25 | + ["meta", { name: "twitter:title", content: "MathFlow" }], |
| 26 | + ["meta", { name: "twitter:description", content: desc }], |
| 27 | + ["meta", { name: "twitter:image", content: ogImage }], |
| 28 | + ], |
| 29 | + themeConfig: { |
| 30 | + // https://vitepress.dev/reference/default-theme-config |
| 31 | + logo: "/logo.svg", |
| 32 | + siteTitle: "MathFlow", |
32 | 33 |
|
33 | | - search: { |
34 | | - provider: 'local', |
35 | | - options: { |
36 | | - detailedView: true, |
37 | | - miniSearch: { |
38 | | - searchOptions: { |
39 | | - fuzzy: 0.2, |
40 | | - prefix: true, |
41 | | - boost: { |
42 | | - title: 4, |
43 | | - text: 2, |
44 | | - titles: 1 |
45 | | - } |
46 | | - } |
47 | | - } |
48 | | - } |
49 | | - }, |
| 34 | + search: { |
| 35 | + provider: "local", |
| 36 | + options: { |
| 37 | + detailedView: true, |
| 38 | + miniSearch: { |
| 39 | + searchOptions: { |
| 40 | + fuzzy: 0.2, |
| 41 | + prefix: true, |
| 42 | + boost: { |
| 43 | + title: 4, |
| 44 | + text: 2, |
| 45 | + titles: 1, |
| 46 | + }, |
| 47 | + }, |
| 48 | + }, |
| 49 | + }, |
| 50 | + }, |
50 | 51 |
|
51 | | - outline: { |
52 | | - label: 'On this page', |
53 | | - level: [2, 3] |
54 | | - }, |
55 | | - nav: [ |
56 | | - { text: 'Home', link: '/' }, |
57 | | - { text: 'Guide', link: '/guide/' }, |
58 | | - { text: 'API', link: '/api/' }, |
59 | | - { text: 'Examples', link: '/examples/' }, |
60 | | - { text: 'Playground', link: '/playground/' }, |
61 | | - { |
62 | | - text: 'v1.0.0', |
63 | | - items: [ |
64 | | - { |
65 | | - text: 'Changelog', |
66 | | - link: 'https://github.com/mathflowjs/mathflow/blob/main/CHANGELOG.md' |
67 | | - }, |
68 | | - { |
69 | | - text: 'Contributing', |
70 | | - link: 'https://github.com/mathflowjs/mathflow/#contributing' |
71 | | - }, |
72 | | - { text: 'Team', link: '/about' }, |
73 | | - ] |
74 | | - } |
75 | | - ], |
| 52 | + outline: { |
| 53 | + label: "On this page", |
| 54 | + level: [2, 3], |
| 55 | + }, |
| 56 | + nav: [ |
| 57 | + { text: "Home", link: "/" }, |
| 58 | + { text: "Guide", link: "/guide/" }, |
| 59 | + { text: "API", link: "/api/" }, |
| 60 | + { text: "Examples", link: "/examples/" }, |
| 61 | + { text: "Playground", link: "/playground/" }, |
| 62 | + { |
| 63 | + text: "v1.0.0", |
| 64 | + items: [ |
| 65 | + { |
| 66 | + text: "Changelog", |
| 67 | + link: "https://github.com/mathflowjs/mathflow/blob/main/CHANGELOG.md", |
| 68 | + }, |
| 69 | + { |
| 70 | + text: "Contributing", |
| 71 | + link: "https://github.com/mathflowjs/mathflow/#contributing", |
| 72 | + }, |
| 73 | + { text: "Team", link: "/about" }, |
| 74 | + ], |
| 75 | + }, |
| 76 | + ], |
76 | 77 |
|
77 | | - sidebar: [ |
78 | | - { |
79 | | - text: 'Introduction', |
80 | | - collapsed: false, |
81 | | - items: [ |
82 | | - { text: 'What is MathFlow?', link: '/guide/' }, |
83 | | - { text: 'Getting Started', link: '/guide/getting-started' }, |
84 | | - ] |
85 | | - }, |
86 | | - { |
87 | | - text: 'Core Concepts', |
88 | | - collapsed: false, |
89 | | - items: [ |
90 | | - { text: 'Basics', link: '/guide/basics' }, |
91 | | - { text: 'Variables', link: '/guide/variables' }, |
92 | | - { text: 'Expressions', link: '/guide/expressions' }, |
93 | | - { text: 'Built-in Functions', link: '/guide/builtin' } |
94 | | - ] |
95 | | - }, |
96 | | - { |
97 | | - text: 'API Reference', |
98 | | - collapsed: false, |
99 | | - items: [ |
100 | | - { text: 'Context API', link: '/api/' }, |
101 | | - { text: 'Procedural API', link: '/api/procedural' }, |
102 | | - { text: 'Error Handling', link: '/api/errors' }, |
103 | | - { text: 'Rendering', link: '/api/rendering' }, |
104 | | - ] |
105 | | - }, |
106 | | - { |
107 | | - text: 'Showcase', |
108 | | - collapsed: false, |
109 | | - items: [ |
110 | | - { text: 'Examples', link: '/examples/' }, |
111 | | - ] |
112 | | - }, |
113 | | - ], |
| 78 | + sidebar: [ |
| 79 | + { |
| 80 | + text: "Introduction", |
| 81 | + collapsed: false, |
| 82 | + items: [ |
| 83 | + { text: "What is MathFlow?", link: "/guide/" }, |
| 84 | + { text: "Getting Started", link: "/guide/getting-started" }, |
| 85 | + ], |
| 86 | + }, |
| 87 | + { |
| 88 | + text: "Core Concepts", |
| 89 | + collapsed: false, |
| 90 | + items: [ |
| 91 | + { text: "Basics", link: "/guide/basics" }, |
| 92 | + { text: "Variables", link: "/guide/variables" }, |
| 93 | + { text: "Expressions", link: "/guide/expressions" }, |
| 94 | + { text: "Built-in Functions", link: "/guide/builtin" }, |
| 95 | + ], |
| 96 | + }, |
| 97 | + { |
| 98 | + text: "API Reference", |
| 99 | + collapsed: false, |
| 100 | + items: [ |
| 101 | + { text: "Context API", link: "/api/" }, |
| 102 | + { text: "Procedural API", link: "/api/procedural" }, |
| 103 | + { text: "Error Handling", link: "/api/errors" }, |
| 104 | + { text: "Rendering", link: "/api/rendering" }, |
| 105 | + ], |
| 106 | + }, |
| 107 | + { |
| 108 | + text: "Showcase", |
| 109 | + collapsed: false, |
| 110 | + items: [{ text: "Examples", link: "/examples/" }], |
| 111 | + }, |
| 112 | + ], |
114 | 113 |
|
115 | | - socialLinks: [ |
116 | | - { icon: 'github', link: 'https://github.com/mathflowjs/mathflow' } |
117 | | - ], |
| 114 | + socialLinks: [ |
| 115 | + { icon: "github", link: "https://github.com/mathflowjs/mathflow" }, |
| 116 | + ], |
118 | 117 |
|
119 | | - editLink: { |
120 | | - text: 'Edit this page on GitHub', |
121 | | - pattern: 'https://github.com/mathflowjs/mathflowjs.github.io/edit/main/docs/:path' |
122 | | - }, |
| 118 | + editLink: { |
| 119 | + text: "Edit this page on GitHub", |
| 120 | + pattern: |
| 121 | + "https://github.com/mathflowjs/mathflowjs.github.io/edit/main/docs/:path", |
| 122 | + }, |
123 | 123 |
|
124 | | - footer: { |
125 | | - message: 'Released under the <a href="https://github.com/mathflowjs/mathflow/blob/master/LICENSE.txt">MIT License</a>.', |
126 | | - copyright: 'Copyright © 2024-present, <a href="https://github.com/henryhale">Henry Hale</a>.' |
127 | | - } |
128 | | - }, |
| 124 | + footer: { |
| 125 | + message: |
| 126 | + 'Released under the <a href="https://github.com/mathflowjs/mathflow/blob/master/LICENSE.txt">MIT License</a>.', |
| 127 | + copyright: |
| 128 | + 'Copyright © 2024-present, <a href="https://github.com/henryhale">Henry Hale</a>.', |
| 129 | + }, |
| 130 | + }, |
129 | 131 |
|
130 | | - markdown: { |
131 | | - lineNumbers: false, |
132 | | - theme: { |
133 | | - light: 'github-light', |
134 | | - dark: 'github-dark' |
135 | | - }, |
136 | | - }, |
| 132 | + markdown: { |
| 133 | + lineNumbers: false, |
| 134 | + theme: { |
| 135 | + light: "github-light", |
| 136 | + dark: "github-dark", |
| 137 | + }, |
| 138 | + }, |
137 | 139 | }); |
0 commit comments