|
| 1 | +import { defineConfig } from 'vitepress'; |
| 2 | +import { withMermaid } from 'vitepress-plugin-mermaid'; |
| 3 | + |
| 4 | +export default withMermaid( |
| 5 | + defineConfig({ |
| 6 | + title: 'itty-spec', |
| 7 | + description: 'Contract-first, type-safe API definitions for itty-router', |
| 8 | + base: '/itty-spec/', |
| 9 | + lastUpdated: true, |
| 10 | + ignoreDeadLinks: true, |
| 11 | + cleanUrls: true, |
| 12 | + markdown: { |
| 13 | + theme: { |
| 14 | + light: 'github-light', |
| 15 | + dark: 'github-dark', |
| 16 | + }, |
| 17 | + }, |
| 18 | + themeConfig: { |
| 19 | + nav: [ |
| 20 | + { text: 'Guide', link: '/guide/getting-started' }, |
| 21 | + { text: 'API', link: '/api/' }, |
| 22 | + { text: 'Examples', link: '/examples/' }, |
| 23 | + ], |
| 24 | + sidebar: { |
| 25 | + '/guide/': [ |
| 26 | + { |
| 27 | + text: 'Getting Started', |
| 28 | + items: [ |
| 29 | + { text: 'Introduction', link: '/guide/getting-started' }, |
| 30 | + { text: 'Core Concepts', link: '/guide/core-concepts' }, |
| 31 | + ], |
| 32 | + }, |
| 33 | + { |
| 34 | + text: 'Guides', |
| 35 | + items: [ |
| 36 | + { text: 'Contracts', link: '/guide/contracts' }, |
| 37 | + { text: 'Router Configuration', link: '/guide/router-configuration' }, |
| 38 | + { text: 'Validation', link: '/guide/validation' }, |
| 39 | + { text: 'Type Safety', link: '/guide/type-safety' }, |
| 40 | + { text: 'Content Types', link: '/guide/content-types' }, |
| 41 | + { text: 'Middleware', link: '/guide/middleware' }, |
| 42 | + { text: 'Error Handling', link: '/guide/error-handling' }, |
| 43 | + { text: 'OpenAPI Integration', link: '/guide/openapi' }, |
| 44 | + { text: 'Schema Libraries', link: '/guide/schema-libraries' }, |
| 45 | + { text: 'Best Practices', link: '/guide/best-practices' }, |
| 46 | + { text: 'Advanced Patterns', link: '/guide/advanced-patterns' }, |
| 47 | + ], |
| 48 | + }, |
| 49 | + { |
| 50 | + text: 'Additional', |
| 51 | + items: [ |
| 52 | + { text: 'Migration Guide', link: '/guide/migration' }, |
| 53 | + { text: 'Troubleshooting', link: '/guide/troubleshooting' }, |
| 54 | + { text: 'FAQ', link: '/guide/faq' }, |
| 55 | + ], |
| 56 | + }, |
| 57 | + ], |
| 58 | + '/api/': [ |
| 59 | + { |
| 60 | + text: 'API Reference', |
| 61 | + items: [ |
| 62 | + { text: 'Overview', link: '/api/' }, |
| 63 | + { text: 'createContract', link: '/api/create-contract' }, |
| 64 | + { text: 'createRouter', link: '/api/create-router' }, |
| 65 | + { text: 'createOpenApiSpecification', link: '/api/create-openapi-specification' }, |
| 66 | + { text: 'Types', link: '/api/types' }, |
| 67 | + { text: 'Middleware API', link: '/api/middleware-api' }, |
| 68 | + ], |
| 69 | + }, |
| 70 | + ], |
| 71 | + '/examples/': [ |
| 72 | + { |
| 73 | + text: 'Examples', |
| 74 | + items: [ |
| 75 | + { text: 'Overview', link: '/examples/' }, |
| 76 | + { text: 'Simple Example', link: '/examples/simple' }, |
| 77 | + { text: 'Complex Example', link: '/examples/complex' }, |
| 78 | + { text: 'Valibot Example', link: '/examples/valibot' }, |
| 79 | + { text: 'Content Types', link: '/examples/content-types' }, |
| 80 | + { text: 'Authentication', link: '/examples/authentication' }, |
| 81 | + { text: 'File Upload', link: '/examples/file-upload' }, |
| 82 | + ], |
| 83 | + }, |
| 84 | + ], |
| 85 | + }, |
| 86 | + socialLinks: [ |
| 87 | + { |
| 88 | + icon: 'github', |
| 89 | + link: 'https://github.com/robertpitt/itty-spec', |
| 90 | + }, |
| 91 | + ], |
| 92 | + footer: { |
| 93 | + message: 'Released under the MIT License.', |
| 94 | + copyright: 'Copyright © 2024', |
| 95 | + }, |
| 96 | + }, |
| 97 | + }) |
| 98 | +); |
0 commit comments