/ .vitepress / config.mts
config.mts
1 import { defineConfig } from 'vitepress' 2 3 // Note: VitePress 1.6.x has issues with Node.js 22 4 // This config is optimized for GitHub Actions CI with Node.js 22 5 6 export default defineConfig({ 7 title: 'AI System Optimization Series', 8 titleTemplate: ':title | AI-Opt-Series', 9 description: 'Full-stack AI infrastructure tutorial: TVM compiler, ONNX Runtime custom ops, CUTLASS GEMM, cuTile programming', 10 11 base: '/ai-system-optimization-series/', 12 cleanUrls: true, 13 ignoreDeadLinks: true, 14 lastUpdated: true, 15 16 // Disable caching to avoid Node.js 22 ESM resolution issues 17 cacheDir: '.vitepress/cache', 18 19 head: [ 20 ['meta', { charset: 'UTF-8' }], 21 ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1.0' }], 22 ['link', { rel: 'canonical', href: 'https://lessup.github.io/ai-system-optimization-series/' }], 23 ['link', { rel: 'icon', type: 'image/svg+xml', href: '/ai-system-optimization-series/logo.svg' }], 24 ['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }], 25 ['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }], 26 ['meta', { name: 'author', content: 'LessUp' }], 27 ['meta', { name: 'theme-color', content: '#0f172a' }], 28 ['meta', { name: 'keywords', content: 'AI optimization, TVM, ONNX Runtime, CUTLASS, CUDA, GPU programming, deep learning, high performance computing' }], 29 ['meta', { property: 'og:type', content: 'website' }], 30 ['meta', { property: 'og:title', content: 'AI System Optimization Series' }], 31 ['meta', { property: 'og:description', content: 'Full-stack AI infrastructure tutorial: compiler optimization to CUDA kernels' }], 32 ['meta', { property: 'og:url', content: 'https://lessup.github.io/ai-system-optimization-series/' }], 33 ['meta', { property: 'og:image', content: 'https://lessup.github.io/ai-system-optimization-series/og-image.svg' }], 34 ['meta', { name: 'twitter:card', content: 'summary_large_image' }], 35 ['meta', { name: 'twitter:title', content: 'AI System Optimization Series' }], 36 ['meta', { name: 'twitter:description', content: 'Full-stack AI system optimization: TVM, ONNX Runtime, CUTLASS, cuTile' }], 37 ['meta', { name: 'twitter:image', content: 'https://lessup.github.io/ai-system-optimization-series/og-image.svg' }], 38 ['meta', { name: 'robots', content: 'index, follow' }], 39 ['meta', { name: 'googlebot', content: 'index, follow, max-snippet:-1, max-image-preview:large' }], 40 ], 41 42 sitemap: { 43 hostname: 'https://lessup.github.io/ai-system-optimization-series/', 44 changefreq: 'weekly', 45 priority: 0.7, 46 }, 47 48 srcExclude: [ 49 'README.md', 50 'README.zh-CN.md', 51 'CHANGELOG.md', 52 'RELEASE_NOTES.md', 53 'LICENSE', 54 'GH_PAGES_OPTIMIZATION.md', 55 'CLAUDE.md', 56 'QWEN.md', 57 '**/node_modules/**', 58 'common/**', 59 'configs/**', 60 'docker/**', 61 'scripts/**', 62 'changelog/**', 63 '**/__pycache__/**', 64 '**/tests/**', 65 '**/build/**', 66 '.kiro/**', 67 '.qwen/**', 68 '.github/**', 69 '.hypothesis/**', 70 '.pytest_cache/**', 71 '.vscode/**', 72 '.ruff_cache/**', 73 ], 74 75 markdown: { 76 lineNumbers: true, 77 languageAlias: { cuda: 'cpp' }, 78 }, 79 80 locales: { 81 root: { 82 label: 'English', 83 lang: 'en', 84 // Root is now the portal page, English docs at /docs/en/ 85 themeConfig: { 86 nav: [ 87 { text: 'Guide', link: '/docs/en/' }, 88 { text: 'Modules', items: [ 89 { text: '01 TVM', link: '/01_TVM_End2End_Optimization/README' }, 90 { text: '02 ORT', link: '/02_ORT_Custom_CUDA_Op/README' }, 91 { text: '03 CUTLASS', link: '/03_CUTLASS_Hopper_GEMM/README' }, 92 { text: '04 cuTile', link: '/04_CuTile_NextGen_CUDA/README' }, 93 ]}, 94 { text: 'Reference', link: '/docs/en/glossary' }, 95 { text: '中文', link: '/docs/zh/' }, 96 ], 97 sidebar: { 98 '/docs/en/': [ 99 { text: 'Getting Started', items: [ 100 { text: 'Quick Start', link: '/docs/en/quick-start' }, 101 { text: 'Prerequisites', link: '/docs/en/prerequisites' }, 102 { text: 'Architecture', link: '/docs/en/architecture' }, 103 { text: 'Learning Path', link: '/docs/en/learning-path' }, 104 ]}, 105 { text: 'Advanced', items: [ 106 { text: 'Performance Tuning', link: '/docs/en/performance-tuning' }, 107 { text: 'API Reference', link: '/docs/en/api-reference' }, 108 ]}, 109 { text: 'Reference', items: [ 110 { text: 'Glossary', link: '/docs/en/glossary' }, 111 { text: 'Troubleshooting', link: '/docs/en/troubleshooting' }, 112 { text: 'References', link: '/docs/en/references' }, 113 { text: 'Contributing', link: '/docs/en/contributing' }, 114 ]}, 115 ], 116 }, 117 editLink: { pattern: 'https://github.com/LessUp/ai-system-optimization-series/edit/master/:path', text: 'Edit this page on GitHub' }, 118 lastUpdated: { text: 'Last updated' }, 119 docFooter: { prev: 'Previous', next: 'Next' }, 120 outline: { label: 'On this page' }, 121 }, 122 }, 123 zh: { 124 label: '简体中文', 125 lang: 'zh-CN', 126 link: '/docs/zh/', 127 // Explicitly set locale path to zh 128 themeConfig: { 129 nav: [ 130 { text: '指南', link: '/docs/zh/' }, 131 { text: '模块', items: [ 132 { text: '01 TVM', link: '/01_TVM_End2End_Optimization/README' }, 133 { text: '02 ORT', link: '/02_ORT_Custom_CUDA_Op/README' }, 134 { text: '03 CUTLASS', link: '/03_CUTLASS_Hopper_GEMM/README' }, 135 { text: '04 cuTile', link: '/04_CuTile_NextGen_CUDA/README' }, 136 ]}, 137 { text: '参考', link: '/docs/zh/glossary' }, 138 { text: 'English', link: '/docs/en/' }, 139 ], 140 sidebar: { 141 '/docs/zh/': [ 142 { text: '入门', items: [ 143 { text: '快速开始', link: '/docs/zh/quick-start' }, 144 { text: '前置要求', link: '/docs/zh/prerequisites' }, 145 { text: '项目架构', link: '/docs/zh/architecture' }, 146 { text: '学习路线', link: '/docs/zh/learning-path' }, 147 ]}, 148 { text: '深入', items: [ 149 { text: '性能调优', link: '/docs/zh/performance-tuning' }, 150 { text: 'API 参考', link: '/docs/zh/api-reference' }, 151 ]}, 152 { text: '参考', items: [ 153 { text: '术语表', link: '/docs/zh/glossary' }, 154 { text: '问题排查', link: '/docs/zh/troubleshooting' }, 155 { text: '参考资料', link: '/docs/zh/references' }, 156 { text: '贡献指南', link: '/docs/zh/contributing' }, 157 ]}, 158 ], 159 }, 160 editLink: { pattern: 'https://github.com/LessUp/ai-system-optimization-series/edit/master/:path', text: '在 GitHub 上编辑此页' }, 161 lastUpdated: { text: '上次更新' }, 162 docFooter: { prev: '上一页', next: '下一页' }, 163 outline: { label: '目录' }, 164 }, 165 }, 166 }, 167 168 themeConfig: { 169 logo: '/logo.svg', 170 siteTitle: 'AI-Opt-Series', 171 outline: { level: [2, 4] }, 172 socialLinks: [ 173 { icon: 'github', link: 'https://github.com/LessUp/ai-system-optimization-series' }, 174 ], 175 search: { 176 provider: 'local', 177 options: { 178 detailedView: true, 179 } 180 }, 181 footer: { 182 message: 'Released under the MIT License.', 183 copyright: `Copyright © 2024-${new Date().getFullYear()} LessUp` 184 }, 185 returnToTopLabel: 'Return to top', 186 sidebarMenuLabel: 'Menu', 187 darkModeSwitchLabel: 'Appearance', 188 langMenuLabel: 'Change language', 189 externalLinkIcon: true, 190 }, 191 192 vite: { 193 build: { 194 minify: 'terser', 195 terserOptions: { 196 compress: { drop_console: true, drop_debugger: true, pure_funcs: ['console.log'] }, 197 }, 198 chunkSizeWarningLimit: 1000, 199 }, 200 esbuild: { target: 'es2020' }, 201 }, 202 })