|
| 1 | +import {defineConfig, type HeadConfig} from 'vitepress' |
| 2 | + |
| 3 | +const base = '/ExpressiveSharp/' |
| 4 | + |
| 5 | +const umamiScript: HeadConfig = ["script", { |
| 6 | + defer: "true", |
| 7 | + src: "https://cloud.umami.is/script.js", |
| 8 | + "data-website-id": "TBD", |
| 9 | +}] |
| 10 | + |
| 11 | +const baseHeaders: HeadConfig[] = [ |
| 12 | + ['link', { rel: 'icon', type: 'image/png', href: `${base}logo.png` }], |
| 13 | + ['meta', { property: 'og:type', content: 'website' }], |
| 14 | + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], |
| 15 | +]; |
| 16 | + |
| 17 | +const headers = process.env.GITHUB_ACTIONS === "true" ? |
| 18 | + [...baseHeaders, umamiScript] : |
| 19 | + baseHeaders; |
| 20 | + |
| 21 | +export default defineConfig({ |
| 22 | + title: "ExpressiveSharp", |
| 23 | + description: "Modern C# syntax in LINQ expression trees — source-generated at compile time", |
| 24 | + base, |
| 25 | + head: headers, |
| 26 | + themeConfig: { |
| 27 | + logo: '/logo.png', |
| 28 | + nav: [ |
| 29 | + { text: 'Home', link: '/' }, |
| 30 | + { text: 'Guide', link: '/guide/introduction' }, |
| 31 | + { text: 'Reference', link: '/reference/expressive-attribute' }, |
| 32 | + { text: 'Advanced', link: '/advanced/how-it-works' }, |
| 33 | + { text: 'Recipes', link: '/recipes/computed-properties' }, |
| 34 | + { text: 'Benchmarks', link: '/dev/bench/' }, |
| 35 | + ], |
| 36 | + |
| 37 | + sidebar: { |
| 38 | + '/guide/': [ |
| 39 | + { |
| 40 | + text: 'Getting Started', |
| 41 | + items: [ |
| 42 | + { text: 'Introduction', link: '/guide/introduction' }, |
| 43 | + { text: 'Quick Start', link: '/guide/quickstart' }, |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + text: 'Core APIs', |
| 48 | + items: [ |
| 49 | + { text: '[Expressive] Properties', link: '/guide/expressive-properties' }, |
| 50 | + { text: '[Expressive] Methods', link: '/guide/expressive-methods' }, |
| 51 | + { text: 'Extension Members', link: '/guide/extension-members' }, |
| 52 | + { text: 'Constructor Projections', link: '/guide/expressive-constructors' }, |
| 53 | + { text: 'ExpressionPolyfill.Create', link: '/guide/expression-polyfill' }, |
| 54 | + { text: 'IRewritableQueryable<T>', link: '/guide/rewritable-queryable' }, |
| 55 | + { text: 'EF Core Integration', link: '/guide/ef-core-integration' }, |
| 56 | + ] |
| 57 | + }, |
| 58 | + { |
| 59 | + text: 'Extensions', |
| 60 | + items: [ |
| 61 | + { text: 'Window Functions (SQL)', link: '/guide/window-functions' }, |
| 62 | + ] |
| 63 | + }, |
| 64 | + { |
| 65 | + text: 'Migration', |
| 66 | + items: [ |
| 67 | + { text: 'Migrating from Projectables', link: '/guide/migration-from-projectables' }, |
| 68 | + ] |
| 69 | + } |
| 70 | + ], |
| 71 | + '/reference/': [ |
| 72 | + { |
| 73 | + text: 'Reference', |
| 74 | + items: [ |
| 75 | + { text: '[Expressive] Attribute', link: '/reference/expressive-attribute' }, |
| 76 | + { text: '[ExpressiveFor] Mapping', link: '/reference/expressive-for' }, |
| 77 | + { text: 'Null-Conditional Rewrite', link: '/reference/null-conditional-rewrite' }, |
| 78 | + { text: 'Pattern Matching', link: '/reference/pattern-matching' }, |
| 79 | + { text: 'Switch Expressions', link: '/reference/switch-expressions' }, |
| 80 | + { text: 'Expression Transformers', link: '/reference/expression-transformers' }, |
| 81 | + { text: 'Diagnostics & Code Fixes', link: '/reference/diagnostics' }, |
| 82 | + ] |
| 83 | + } |
| 84 | + ], |
| 85 | + '/advanced/': [ |
| 86 | + { |
| 87 | + text: 'Advanced', |
| 88 | + items: [ |
| 89 | + { text: 'How It Works', link: '/advanced/how-it-works' }, |
| 90 | + { text: 'IOperation to Expression Mapping', link: '/advanced/ioperation-mapping' }, |
| 91 | + { text: 'Block-Bodied Members', link: '/advanced/block-bodied-members' }, |
| 92 | + { text: 'Custom Transformers', link: '/advanced/custom-transformers' }, |
| 93 | + { text: 'Testing Strategy', link: '/advanced/testing-strategy' }, |
| 94 | + { text: 'Limitations', link: '/advanced/limitations' }, |
| 95 | + ] |
| 96 | + } |
| 97 | + ], |
| 98 | + '/recipes/': [ |
| 99 | + { |
| 100 | + text: 'Recipes', |
| 101 | + items: [ |
| 102 | + { text: 'Computed Entity Properties', link: '/recipes/computed-properties' }, |
| 103 | + { text: 'DTO Projections with Constructors', link: '/recipes/dto-projections' }, |
| 104 | + { text: 'Scoring & Classification', link: '/recipes/scoring-classification' }, |
| 105 | + { text: 'Nullable Navigation Properties', link: '/recipes/nullable-navigation' }, |
| 106 | + { text: 'Reusable Query Filters', link: '/recipes/reusable-query-filters' }, |
| 107 | + { text: 'External Member Mapping', link: '/recipes/external-member-mapping' }, |
| 108 | + { text: 'Modern Syntax in LINQ Chains', link: '/recipes/modern-syntax-in-linq' }, |
| 109 | + { text: 'Window Functions & Ranking', link: '/recipes/window-functions-ranking' }, |
| 110 | + ] |
| 111 | + } |
| 112 | + ], |
| 113 | + }, |
| 114 | + |
| 115 | + socialLinks: [ |
| 116 | + { icon: 'github', link: 'https://github.com/EFNext/ExpressiveSharp' } |
| 117 | + ], |
| 118 | + |
| 119 | + search: { |
| 120 | + provider: 'local' |
| 121 | + }, |
| 122 | + |
| 123 | + footer: { |
| 124 | + message: 'Released under the MIT License.', |
| 125 | + copyright: 'Copyright © ExpressiveSharp Contributors' |
| 126 | + } |
| 127 | + } |
| 128 | +}) |
0 commit comments