|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | +import { tabsMarkdownPlugin } from './vitepress-plugin-tabs/tabsMarkdownPlugin' |
| 3 | + |
| 4 | +const title = 'Inertia Rails' |
| 5 | +const description = 'Documentation for Inertia.js Rails adapter' |
| 6 | +const site = 'https://inertia-rails.dev' |
| 7 | +const image = `${site}/og_image.jpg` |
| 8 | + |
| 9 | +// https://vitepress.dev/reference/site-config |
| 10 | +export default defineConfig({ |
| 11 | + title, |
| 12 | + description, |
| 13 | + |
| 14 | + markdown: { |
| 15 | + config(md) { |
| 16 | + md.use(tabsMarkdownPlugin) |
| 17 | + }, |
| 18 | + }, |
| 19 | + |
| 20 | + head: [ |
| 21 | + ['link', { rel: 'icon', href: '/favicon.ico', sizes: '32x32' }], |
| 22 | + ['link', { rel: 'icon', href: '/icon.svg', type: 'image/svg+xml' }], |
| 23 | + |
| 24 | + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], |
| 25 | + ['meta', { name: 'twitter:site', content: site }], |
| 26 | + ['meta', { name: 'twitter:description', value: description }], |
| 27 | + ['meta', { name: 'twitter:image', content: image }], |
| 28 | + |
| 29 | + ['meta', { property: 'og:type', content: 'website' }], |
| 30 | + ['meta', { property: 'og:locale', content: 'en_US' }], |
| 31 | + ['meta', { property: 'og:site', content: site }], |
| 32 | + ['meta', { property: 'og:site_name', content: title }], |
| 33 | + ['meta', { property: 'og:image', content: image }], |
| 34 | + ['meta', { property: 'og:description', content: description }], |
| 35 | + ], |
| 36 | + themeConfig: { |
| 37 | + // https://vitepress.dev/reference/default-theme-config |
| 38 | + nav: [ |
| 39 | + { text: 'Home', link: '/' }, |
| 40 | + { text: 'Guide', link: '/guide' }, |
| 41 | + { text: 'Cookbook', link: '/cookbook/integrating-shadcn-ui' }, |
| 42 | + { |
| 43 | + text: 'Links', |
| 44 | + items: [ |
| 45 | + { text: 'Official Inertia.js docs', link: 'https://inertiajs.com' }, |
| 46 | + { |
| 47 | + text: 'Gems', |
| 48 | + items: [ |
| 49 | + { |
| 50 | + text: 'inertia_rails', |
| 51 | + link: 'https://github.com/inertiajs/inertia-rails', |
| 52 | + }, |
| 53 | + { |
| 54 | + text: 'inertia_rails-contrib', |
| 55 | + link: 'https://github.com/skryukov/inertia_rails-contrib', |
| 56 | + }, |
| 57 | + ], |
| 58 | + }, |
| 59 | + ], |
| 60 | + }, |
| 61 | + ], |
| 62 | + |
| 63 | + logo: '/logo.svg', |
| 64 | + |
| 65 | + sidebar: { |
| 66 | + '/guide': [ |
| 67 | + { |
| 68 | + items: [ |
| 69 | + { text: 'Introduction', link: '/guide' }, |
| 70 | + { text: 'Demo app', link: '/guide/demo-application' }, |
| 71 | + ], |
| 72 | + }, |
| 73 | + { |
| 74 | + text: 'Installation', |
| 75 | + items: [ |
| 76 | + { text: 'Server-side', link: '/guide/server-side-setup' }, |
| 77 | + { text: 'Client-side', link: '/guide/client-side-setup' }, |
| 78 | + ], |
| 79 | + }, |
| 80 | + { |
| 81 | + text: 'Core concepts', |
| 82 | + items: [ |
| 83 | + { text: 'Who is it for', link: '/guide/who-is-it-for' }, |
| 84 | + { text: 'How it works', link: '/guide/how-it-works' }, |
| 85 | + { text: 'The protocol', link: '/guide/the-protocol' }, |
| 86 | + ], |
| 87 | + }, |
| 88 | + { |
| 89 | + text: 'The basics', |
| 90 | + items: [ |
| 91 | + { text: 'Pages', link: '/guide/pages' }, |
| 92 | + { text: 'Responses', link: '/guide/responses' }, |
| 93 | + { text: 'Redirects', link: '/guide/redirects' }, |
| 94 | + { text: 'Routing', link: '/guide/routing' }, |
| 95 | + { text: 'Title & meta', link: '/guide/title-and-meta' }, |
| 96 | + { text: 'Links', link: '/guide/links' }, |
| 97 | + { text: 'Manual visits', link: '/guide/manual-visits' }, |
| 98 | + { text: 'Forms', link: '/guide/forms' }, |
| 99 | + { text: 'File uploads', link: '/guide/file-uploads' }, |
| 100 | + { text: 'Validation', link: '/guide/validation' }, |
| 101 | + { text: 'Shared data', link: '/guide/shared-data' }, |
| 102 | + ], |
| 103 | + }, |
| 104 | + { |
| 105 | + text: 'Advanced', |
| 106 | + items: [ |
| 107 | + { text: 'Events', link: '/guide/events' }, |
| 108 | + { text: 'Testing', link: '/guide/testing' }, |
| 109 | + { text: 'Partial reloads', link: '/guide/partial-reloads' }, |
| 110 | + { text: 'Scroll management', link: '/guide/scroll-management' }, |
| 111 | + { text: 'Authentication', link: '/guide/authentication' }, |
| 112 | + { text: 'Authorization', link: '/guide/authorization' }, |
| 113 | + { text: 'CSRF protection', link: '/guide/csrf-protection' }, |
| 114 | + { text: 'Error handling', link: '/guide/error-handling' }, |
| 115 | + { text: 'Asset versioning', link: '/guide/asset-versioning' }, |
| 116 | + { text: 'Progress indicators', link: '/guide/progress-indicators' }, |
| 117 | + { text: 'Remembering state', link: '/guide/remembering-state' }, |
| 118 | + { text: 'Code splitting', link: '/guide/code-splitting' }, |
| 119 | + { |
| 120 | + text: 'Server-side rendering', |
| 121 | + link: '/guide/server-side-rendering', |
| 122 | + }, |
| 123 | + ], |
| 124 | + }, |
| 125 | + ], |
| 126 | + '/cookbook': [ |
| 127 | + { |
| 128 | + items: [ |
| 129 | + { |
| 130 | + text: 'Integrations', |
| 131 | + items: [ |
| 132 | + { text: 'shadcn/ui', link: '/cookbook/integrating-shadcn-ui' }, |
| 133 | + ], |
| 134 | + }, |
| 135 | + ], |
| 136 | + }, |
| 137 | + ], |
| 138 | + }, |
| 139 | + |
| 140 | + search: { |
| 141 | + provider: 'local', |
| 142 | + }, |
| 143 | + |
| 144 | + editLink: { |
| 145 | + pattern: |
| 146 | + 'https://github.com/inertiajs/inertia-rails/edit/master/docs/:path', |
| 147 | + text: 'Edit this page on GitHub', |
| 148 | + }, |
| 149 | + |
| 150 | + socialLinks: [ |
| 151 | + { icon: 'github', link: 'https://github.com/inertiajs/inertia-rails' }, |
| 152 | + { icon: 'x', link: 'https://x.com/inertiajs' }, |
| 153 | + { icon: 'discord', link: 'https://discord.gg/inertiajs' }, |
| 154 | + ], |
| 155 | + }, |
| 156 | +}) |
0 commit comments