Skip to content

Commit d60783f

Browse files
committed
Move to VitePress
1 parent 95d6d06 commit d60783f

310 files changed

Lines changed: 8039 additions & 24606 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Docs to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- vitepress
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
deployments: write
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 10
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 'lts/*'
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build VitePress
35+
run: pnpm build
36+
37+
- name: Deploy to Cloudflare Pages
38+
uses: cloudflare/wrangler-action@v3
39+
with:
40+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42+
command: pages deploy .vitepress/dist --project-name=vyuh-docs

.gitignore

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
1-
# build output
2-
dist/
3-
# generated types
4-
.astro/
5-
6-
# dependencies
71
node_modules/
8-
9-
# logs
10-
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
pnpm-debug.log*
14-
15-
16-
# environment variables
17-
.env
18-
.env.production
19-
20-
# macOS-specific files
2+
.vitepress/dist/
3+
.vitepress/cache/
214
.DS_Store
22-
23-
# Others
5+
*.local
6+
.plans/
247
.idea
25-
.firebase
26-
.vscode

.idea/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.idea/docs.iml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.prettierrc.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

.vitepress/config.ts

Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
import { defineConfig } from 'vitepress';
2+
import tailwindcss from '@tailwindcss/vite';
3+
4+
export default defineConfig({
5+
vite: {
6+
plugins: [tailwindcss()],
7+
},
8+
9+
appearance: true, // Enable dark mode toggle
10+
cleanUrls: true,
11+
12+
title: 'Vyuh',
13+
description: 'Build Modular, CMS-driven Flutter Apps. At Scale.',
14+
15+
head: [
16+
// Google Analytics 4
17+
[
18+
'script',
19+
{
20+
async: '',
21+
src: 'https://www.googletagmanager.com/gtag/js?id=G-3THXBRT184',
22+
},
23+
],
24+
[
25+
'script',
26+
{},
27+
`
28+
window.dataLayer = window.dataLayer || [];
29+
function gtag(){dataLayer.push(arguments);}
30+
gtag('js', new Date());
31+
gtag('config', 'G-3THXBRT184');
32+
`,
33+
],
34+
35+
// Preconnect for faster resource loading
36+
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
37+
[
38+
'link',
39+
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' },
40+
],
41+
42+
// Non-blocking font loading
43+
// Montserrat: 400 (regular body), 600 (semibold), 700 (bold), 900 (black for headers)
44+
// JetBrains Mono: 400 only (code doesn't need variants)
45+
[
46+
'link',
47+
{
48+
rel: 'stylesheet',
49+
href: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&family=Montserrat:wght@400;600;700;900&display=swap',
50+
media: 'print',
51+
onload: "this.media='all'",
52+
},
53+
],
54+
// Fallback for browsers with JS disabled
55+
[
56+
'noscript',
57+
{},
58+
'<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&family=Montserrat:wght@400;600;700;900&display=swap">',
59+
],
60+
61+
// Favicon
62+
['link', { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }],
63+
64+
// Open Graph meta tags
65+
['meta', { property: 'og:type', content: 'website' }],
66+
[
67+
'meta',
68+
{
69+
property: 'og:title',
70+
content: 'Vyuh - Build Modular, CMS-driven Flutter Apps',
71+
},
72+
],
73+
[
74+
'meta',
75+
{
76+
property: 'og:description',
77+
content:
78+
'Build Modular, CMS-driven Flutter Apps. At Scale.',
79+
},
80+
],
81+
[
82+
'meta',
83+
{
84+
property: 'og:image',
85+
content: 'https://docs.vyuh.tech/social-card.png',
86+
},
87+
],
88+
['meta', { property: 'og:url', content: 'https://docs.vyuh.tech' }],
89+
90+
// Twitter card meta tags
91+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
92+
[
93+
'meta',
94+
{
95+
name: 'twitter:title',
96+
content: 'Vyuh - Build Modular, CMS-driven Flutter Apps',
97+
},
98+
],
99+
[
100+
'meta',
101+
{
102+
name: 'twitter:description',
103+
content:
104+
'Build Modular, CMS-driven Flutter Apps. At Scale.',
105+
},
106+
],
107+
[
108+
'meta',
109+
{
110+
name: 'twitter:image',
111+
content: 'https://docs.vyuh.tech/social-card.png',
112+
},
113+
],
114+
],
115+
116+
themeConfig: {
117+
logo: '/logo.svg',
118+
119+
nav: [
120+
{ text: 'Getting Started', link: '/docs/intro/' },
121+
{ text: 'Guides', link: '/docs/guides/creating-a-feature' },
122+
{ text: 'Framework', link: '/docs/framework/' },
123+
{ text: 'Examples', link: '/docs/examples/' },
124+
],
125+
126+
sidebar: {
127+
'/docs/': [
128+
{
129+
text: 'Getting Started',
130+
items: [
131+
{ text: 'What is Vyuh?', link: '/docs/intro/' },
132+
{ text: 'Quick Start', link: '/docs/intro/get-started' },
133+
{ text: 'CLI', link: '/docs/intro/cli' },
134+
{ text: 'Project Structure', link: '/docs/intro/project-structure' },
135+
],
136+
},
137+
{
138+
text: 'Concepts',
139+
items: [
140+
{ text: 'Overview', link: '/docs/concepts/' },
141+
{ text: 'Content-Driven Apps', link: '/docs/concepts/content-driven-apps' },
142+
{ text: 'Features & Plugins', link: '/docs/concepts/features-and-plugins' },
143+
{ text: 'Descriptors & Builders', link: '/docs/concepts/descriptors-and-builders' },
144+
{ text: 'Thinking in Blocks', link: '/docs/concepts/thinking-in-blocks' },
145+
{ text: 'Glossary', link: '/docs/concepts/glossary' },
146+
],
147+
},
148+
{
149+
text: 'Guides',
150+
collapsed: false,
151+
items: [
152+
{
153+
text: 'Features',
154+
collapsed: true,
155+
items: [
156+
{ text: 'Creating a Feature', link: '/docs/guides/creating-a-feature' },
157+
{ text: 'Feature Descriptors', link: '/docs/guides/feature-descriptors' },
158+
{ text: 'Designing Features', link: '/docs/guides/designing-features' },
159+
],
160+
},
161+
{
162+
text: 'Content System',
163+
collapsed: true,
164+
items: [
165+
{ text: 'Content Types', link: '/docs/guides/content-types' },
166+
{ text: 'Layouts', link: '/docs/guides/layouts' },
167+
{ text: 'Actions', link: '/docs/guides/actions' },
168+
{ text: 'Conditions', link: '/docs/guides/conditions' },
169+
{ text: 'Modifiers', link: '/docs/guides/modifiers' },
170+
{ text: 'API Content', link: '/docs/guides/api-content' },
171+
],
172+
},
173+
{
174+
text: 'CMS Integration',
175+
collapsed: true,
176+
items: [
177+
{ text: 'Setting Up Sanity', link: '/docs/guides/setting-up-sanity' },
178+
{ text: 'Designing Schemas', link: '/docs/guides/designing-content-schemas' },
179+
{ text: 'Content Previews', link: '/docs/guides/content-previews' },
180+
{ text: 'Live Editing', link: '/docs/guides/live-content-editing' },
181+
{ text: 'Sanity Structure Plugin', link: '/docs/guides/sanity-structure-plugin' },
182+
],
183+
},
184+
{
185+
text: 'Routing',
186+
collapsed: true,
187+
items: [
188+
{ text: 'Routes & Navigation', link: '/docs/guides/routes-and-navigation' },
189+
{ text: 'Conditional Routes', link: '/docs/guides/conditional-routes' },
190+
{ text: 'Template Routes', link: '/docs/guides/template-routes' },
191+
],
192+
},
193+
{
194+
text: 'Advanced',
195+
collapsed: true,
196+
items: [
197+
{ text: 'Scoped DI', link: '/docs/guides/scoped-di' },
198+
{ text: 'Events', link: '/docs/guides/events' },
199+
{ text: 'Using Plugins', link: '/docs/guides/using-plugins' },
200+
{ text: 'Adding Packages', link: '/docs/guides/adding-packages' },
201+
],
202+
},
203+
],
204+
},
205+
{
206+
text: 'Framework',
207+
collapsed: true,
208+
items: [
209+
{ text: 'Overview', link: '/docs/framework/' },
210+
{ text: 'vyuh_core', link: '/docs/framework/vyuh-core' },
211+
{ text: 'vyuh_extension_content', link: '/docs/framework/vyuh-extension-content' },
212+
{ text: 'vyuh_feature_system', link: '/docs/framework/vyuh-feature-system' },
213+
{ text: 'vyuh_feature_auth', link: '/docs/framework/vyuh-feature-auth' },
214+
{ text: 'vyuh_feature_onboarding', link: '/docs/framework/vyuh-feature-onboarding' },
215+
{ text: 'vyuh_feature_developer', link: '/docs/framework/vyuh-feature-developer' },
216+
{ text: 'vyuh_content_widget', link: '/docs/framework/vyuh-content-widget' },
217+
{ text: 'vyuh_cache', link: '/docs/framework/vyuh-cache' },
218+
{ text: 'sanity_client', link: '/docs/framework/sanity-client' },
219+
{ text: 'flutter_sanity_portable_text', link: '/docs/framework/flutter-sanity-portable-text' },
220+
{ text: 'Content Provider (Sanity)', link: '/docs/framework/vyuh-plugin-content-provider-sanity' },
221+
{ text: 'Hive Storage', link: '/docs/framework/hive-storage' },
222+
{ text: 'Secure Storage', link: '/docs/framework/secure-storage' },
223+
{ text: 'Console Telemetry', link: '/docs/framework/console-telemetry' },
224+
{ text: 'Changelog', link: '/docs/framework/changelog' },
225+
],
226+
},
227+
{
228+
text: 'Examples',
229+
collapsed: true,
230+
items: [
231+
{ text: 'Overview', link: '/docs/examples/' },
232+
{ text: 'Counter', link: '/docs/examples/counter' },
233+
{ text: 'Food', link: '/docs/examples/food' },
234+
{ text: 'Puzzles', link: '/docs/examples/puzzles' },
235+
{ text: 'Movies', link: '/docs/examples/movies' },
236+
{ text: 'Conference', link: '/docs/examples/conference' },
237+
{ text: 'Wonderous', link: '/docs/examples/wonderous' },
238+
{ text: 'Unsplash', link: '/docs/examples/unsplash' },
239+
],
240+
},
241+
],
242+
},
243+
244+
socialLinks: [
245+
{ icon: 'github', link: 'https://github.com/vyuh-tech/vyuh' },
246+
],
247+
248+
search: {
249+
provider: 'local',
250+
},
251+
252+
editLink: {
253+
pattern:
254+
'https://github.com/vyuh-tech/vyuh/edit/main/docs/:path',
255+
},
256+
},
257+
});

0 commit comments

Comments
 (0)