|
| 1 | +import { defineConfig } from 'vitepress'; |
| 2 | +import tailwindcss from '@tailwindcss/vite'; |
| 3 | + |
| 4 | +export default defineConfig({ |
| 5 | + vite: { |
| 6 | + plugins: [tailwindcss()], |
| 7 | + }, |
| 8 | + |
| 9 | + appearance: true, // Enable dark mode toggle |
| 10 | + cleanUrls: true, |
| 11 | + |
| 12 | + title: 'Vyuh', |
| 13 | + description: 'Build Modular, CMS-driven Flutter Apps. At Scale.', |
| 14 | + |
| 15 | + head: [ |
| 16 | + // Google Analytics 4 |
| 17 | + [ |
| 18 | + 'script', |
| 19 | + { |
| 20 | + async: '', |
| 21 | + src: 'https://www.googletagmanager.com/gtag/js?id=G-3THXBRT184', |
| 22 | + }, |
| 23 | + ], |
| 24 | + [ |
| 25 | + 'script', |
| 26 | + {}, |
| 27 | + ` |
| 28 | + window.dataLayer = window.dataLayer || []; |
| 29 | + function gtag(){dataLayer.push(arguments);} |
| 30 | + gtag('js', new Date()); |
| 31 | + gtag('config', 'G-3THXBRT184'); |
| 32 | + `, |
| 33 | + ], |
| 34 | + |
| 35 | + // Preconnect for faster resource loading |
| 36 | + ['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }], |
| 37 | + [ |
| 38 | + 'link', |
| 39 | + { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }, |
| 40 | + ], |
| 41 | + |
| 42 | + // Non-blocking font loading |
| 43 | + // Montserrat: 400 (regular body), 600 (semibold), 700 (bold), 900 (black for headers) |
| 44 | + // JetBrains Mono: 400 only (code doesn't need variants) |
| 45 | + [ |
| 46 | + 'link', |
| 47 | + { |
| 48 | + rel: 'stylesheet', |
| 49 | + href: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&family=Montserrat:wght@400;600;700;900&display=swap', |
| 50 | + media: 'print', |
| 51 | + onload: "this.media='all'", |
| 52 | + }, |
| 53 | + ], |
| 54 | + // Fallback for browsers with JS disabled |
| 55 | + [ |
| 56 | + 'noscript', |
| 57 | + {}, |
| 58 | + '<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&family=Montserrat:wght@400;600;700;900&display=swap">', |
| 59 | + ], |
| 60 | + |
| 61 | + // Favicon |
| 62 | + ['link', { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }], |
| 63 | + |
| 64 | + // Open Graph meta tags |
| 65 | + ['meta', { property: 'og:type', content: 'website' }], |
| 66 | + [ |
| 67 | + 'meta', |
| 68 | + { |
| 69 | + property: 'og:title', |
| 70 | + content: 'Vyuh - Build Modular, CMS-driven Flutter Apps', |
| 71 | + }, |
| 72 | + ], |
| 73 | + [ |
| 74 | + 'meta', |
| 75 | + { |
| 76 | + property: 'og:description', |
| 77 | + content: |
| 78 | + 'Build Modular, CMS-driven Flutter Apps. At Scale.', |
| 79 | + }, |
| 80 | + ], |
| 81 | + [ |
| 82 | + 'meta', |
| 83 | + { |
| 84 | + property: 'og:image', |
| 85 | + content: 'https://docs.vyuh.tech/social-card.png', |
| 86 | + }, |
| 87 | + ], |
| 88 | + ['meta', { property: 'og:url', content: 'https://docs.vyuh.tech' }], |
| 89 | + |
| 90 | + // Twitter card meta tags |
| 91 | + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], |
| 92 | + [ |
| 93 | + 'meta', |
| 94 | + { |
| 95 | + name: 'twitter:title', |
| 96 | + content: 'Vyuh - Build Modular, CMS-driven Flutter Apps', |
| 97 | + }, |
| 98 | + ], |
| 99 | + [ |
| 100 | + 'meta', |
| 101 | + { |
| 102 | + name: 'twitter:description', |
| 103 | + content: |
| 104 | + 'Build Modular, CMS-driven Flutter Apps. At Scale.', |
| 105 | + }, |
| 106 | + ], |
| 107 | + [ |
| 108 | + 'meta', |
| 109 | + { |
| 110 | + name: 'twitter:image', |
| 111 | + content: 'https://docs.vyuh.tech/social-card.png', |
| 112 | + }, |
| 113 | + ], |
| 114 | + ], |
| 115 | + |
| 116 | + themeConfig: { |
| 117 | + logo: '/logo.svg', |
| 118 | + |
| 119 | + nav: [ |
| 120 | + { text: 'Getting Started', link: '/docs/intro/' }, |
| 121 | + { text: 'Guides', link: '/docs/guides/creating-a-feature' }, |
| 122 | + { text: 'Framework', link: '/docs/framework/' }, |
| 123 | + { text: 'Examples', link: '/docs/examples/' }, |
| 124 | + ], |
| 125 | + |
| 126 | + sidebar: { |
| 127 | + '/docs/': [ |
| 128 | + { |
| 129 | + text: 'Getting Started', |
| 130 | + items: [ |
| 131 | + { text: 'What is Vyuh?', link: '/docs/intro/' }, |
| 132 | + { text: 'Quick Start', link: '/docs/intro/get-started' }, |
| 133 | + { text: 'CLI', link: '/docs/intro/cli' }, |
| 134 | + { text: 'Project Structure', link: '/docs/intro/project-structure' }, |
| 135 | + ], |
| 136 | + }, |
| 137 | + { |
| 138 | + text: 'Concepts', |
| 139 | + items: [ |
| 140 | + { text: 'Overview', link: '/docs/concepts/' }, |
| 141 | + { text: 'Content-Driven Apps', link: '/docs/concepts/content-driven-apps' }, |
| 142 | + { text: 'Features & Plugins', link: '/docs/concepts/features-and-plugins' }, |
| 143 | + { text: 'Descriptors & Builders', link: '/docs/concepts/descriptors-and-builders' }, |
| 144 | + { text: 'Thinking in Blocks', link: '/docs/concepts/thinking-in-blocks' }, |
| 145 | + { text: 'Glossary', link: '/docs/concepts/glossary' }, |
| 146 | + ], |
| 147 | + }, |
| 148 | + { |
| 149 | + text: 'Guides', |
| 150 | + collapsed: false, |
| 151 | + items: [ |
| 152 | + { |
| 153 | + text: 'Features', |
| 154 | + collapsed: true, |
| 155 | + items: [ |
| 156 | + { text: 'Creating a Feature', link: '/docs/guides/creating-a-feature' }, |
| 157 | + { text: 'Feature Descriptors', link: '/docs/guides/feature-descriptors' }, |
| 158 | + { text: 'Designing Features', link: '/docs/guides/designing-features' }, |
| 159 | + ], |
| 160 | + }, |
| 161 | + { |
| 162 | + text: 'Content System', |
| 163 | + collapsed: true, |
| 164 | + items: [ |
| 165 | + { text: 'Content Types', link: '/docs/guides/content-types' }, |
| 166 | + { text: 'Layouts', link: '/docs/guides/layouts' }, |
| 167 | + { text: 'Actions', link: '/docs/guides/actions' }, |
| 168 | + { text: 'Conditions', link: '/docs/guides/conditions' }, |
| 169 | + { text: 'Modifiers', link: '/docs/guides/modifiers' }, |
| 170 | + { text: 'API Content', link: '/docs/guides/api-content' }, |
| 171 | + ], |
| 172 | + }, |
| 173 | + { |
| 174 | + text: 'CMS Integration', |
| 175 | + collapsed: true, |
| 176 | + items: [ |
| 177 | + { text: 'Setting Up Sanity', link: '/docs/guides/setting-up-sanity' }, |
| 178 | + { text: 'Designing Schemas', link: '/docs/guides/designing-content-schemas' }, |
| 179 | + { text: 'Content Previews', link: '/docs/guides/content-previews' }, |
| 180 | + { text: 'Live Editing', link: '/docs/guides/live-content-editing' }, |
| 181 | + { text: 'Sanity Structure Plugin', link: '/docs/guides/sanity-structure-plugin' }, |
| 182 | + ], |
| 183 | + }, |
| 184 | + { |
| 185 | + text: 'Routing', |
| 186 | + collapsed: true, |
| 187 | + items: [ |
| 188 | + { text: 'Routes & Navigation', link: '/docs/guides/routes-and-navigation' }, |
| 189 | + { text: 'Conditional Routes', link: '/docs/guides/conditional-routes' }, |
| 190 | + { text: 'Template Routes', link: '/docs/guides/template-routes' }, |
| 191 | + ], |
| 192 | + }, |
| 193 | + { |
| 194 | + text: 'Advanced', |
| 195 | + collapsed: true, |
| 196 | + items: [ |
| 197 | + { text: 'Scoped DI', link: '/docs/guides/scoped-di' }, |
| 198 | + { text: 'Events', link: '/docs/guides/events' }, |
| 199 | + { text: 'Using Plugins', link: '/docs/guides/using-plugins' }, |
| 200 | + { text: 'Adding Packages', link: '/docs/guides/adding-packages' }, |
| 201 | + ], |
| 202 | + }, |
| 203 | + ], |
| 204 | + }, |
| 205 | + { |
| 206 | + text: 'Framework', |
| 207 | + collapsed: true, |
| 208 | + items: [ |
| 209 | + { text: 'Overview', link: '/docs/framework/' }, |
| 210 | + { text: 'vyuh_core', link: '/docs/framework/vyuh-core' }, |
| 211 | + { text: 'vyuh_extension_content', link: '/docs/framework/vyuh-extension-content' }, |
| 212 | + { text: 'vyuh_feature_system', link: '/docs/framework/vyuh-feature-system' }, |
| 213 | + { text: 'vyuh_feature_auth', link: '/docs/framework/vyuh-feature-auth' }, |
| 214 | + { text: 'vyuh_feature_onboarding', link: '/docs/framework/vyuh-feature-onboarding' }, |
| 215 | + { text: 'vyuh_feature_developer', link: '/docs/framework/vyuh-feature-developer' }, |
| 216 | + { text: 'vyuh_content_widget', link: '/docs/framework/vyuh-content-widget' }, |
| 217 | + { text: 'vyuh_cache', link: '/docs/framework/vyuh-cache' }, |
| 218 | + { text: 'sanity_client', link: '/docs/framework/sanity-client' }, |
| 219 | + { text: 'flutter_sanity_portable_text', link: '/docs/framework/flutter-sanity-portable-text' }, |
| 220 | + { text: 'Content Provider (Sanity)', link: '/docs/framework/vyuh-plugin-content-provider-sanity' }, |
| 221 | + { text: 'Hive Storage', link: '/docs/framework/hive-storage' }, |
| 222 | + { text: 'Secure Storage', link: '/docs/framework/secure-storage' }, |
| 223 | + { text: 'Console Telemetry', link: '/docs/framework/console-telemetry' }, |
| 224 | + { text: 'Changelog', link: '/docs/framework/changelog' }, |
| 225 | + ], |
| 226 | + }, |
| 227 | + { |
| 228 | + text: 'Examples', |
| 229 | + collapsed: true, |
| 230 | + items: [ |
| 231 | + { text: 'Overview', link: '/docs/examples/' }, |
| 232 | + { text: 'Counter', link: '/docs/examples/counter' }, |
| 233 | + { text: 'Food', link: '/docs/examples/food' }, |
| 234 | + { text: 'Puzzles', link: '/docs/examples/puzzles' }, |
| 235 | + { text: 'Movies', link: '/docs/examples/movies' }, |
| 236 | + { text: 'Conference', link: '/docs/examples/conference' }, |
| 237 | + { text: 'Wonderous', link: '/docs/examples/wonderous' }, |
| 238 | + { text: 'Unsplash', link: '/docs/examples/unsplash' }, |
| 239 | + ], |
| 240 | + }, |
| 241 | + ], |
| 242 | + }, |
| 243 | + |
| 244 | + socialLinks: [ |
| 245 | + { icon: 'github', link: 'https://github.com/vyuh-tech/vyuh' }, |
| 246 | + ], |
| 247 | + |
| 248 | + search: { |
| 249 | + provider: 'local', |
| 250 | + }, |
| 251 | + |
| 252 | + editLink: { |
| 253 | + pattern: |
| 254 | + 'https://github.com/vyuh-tech/vyuh/edit/main/docs/:path', |
| 255 | + }, |
| 256 | + }, |
| 257 | +}); |
0 commit comments