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