Skip to content

Commit a846994

Browse files
authored
feat: rewrite homepage with vitepress (#186)
1 parent 8b903bd commit a846994

File tree

313 files changed

+5602
-34446
lines changed

Some content is hidden

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

313 files changed

+5602
-34446
lines changed

.drone.yml

-84
This file was deleted.

.github/preview.png

523 KB
Loading

.github/workflows/auto-merge.yaml

-26
This file was deleted.

.github/workflows/ci.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 20.6.1
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20.6.1
18+
19+
- name: Setup
20+
run: npm i -g @antfu/ni
21+
22+
- name: Install
23+
run: nci
24+
25+
- name: Lint
26+
run: nr lint
27+
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Use Node.js 20.6.1
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20.6.1
36+
37+
- name: Setup
38+
run: npm i -g @antfu/ni
39+
40+
- name: Install
41+
run: nci
42+
43+
- name: Build
44+
run: nr build

.github/workflows/deploy-docs.yaml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+
concurrency:
19+
group: pages
20+
cancel-in-progress: false
21+
22+
jobs:
23+
# Build job
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0 # Required to calculate lastUpdated
31+
- name: Install pnpm
32+
uses: pnpm/action-setup@v3
33+
with:
34+
version: 8
35+
- name: Setup Node
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 20
39+
cache: pnpm
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
- name: Install dependencies
43+
run: pnpm i
44+
- name: Build with VitePress
45+
run: pnpm build
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: .vitepress/dist
50+
51+
# Deployment job
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
needs: build
57+
runs-on: ubuntu-latest
58+
name: Deploy
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
## User-specific files
2+
.DS_Store
3+
.idea
4+
5+
## Vite Press related
6+
.vitepress/cache
7+
.vitepress/dist
8+
19
node_modules
210
*.iml
3-
.idea
411
*.log*
512
.nuxt
6-
.vscode
7-
.DS_Store
813
coverage
914
dist
1015
sw.*

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
shamefully-hoist=true
22
strict-peer-dependencies=false
3+
ignore-workspace-root-check=true

.vitepress/config.mts

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { defineConfig } from 'vitepress'
2+
import { routes as navRoutes } from './routes/navbar'
3+
import { routes as sidebarRoutes } from './routes/sidebar'
4+
5+
// https://vitepress.dev/reference/site-config
6+
export default defineConfig({
7+
title: 'sidebase',
8+
titleTemplate: ':title - by SIDESTREAM',
9+
description: 'The productive way to build fullstack Nuxt 3 applications.',
10+
srcDir: 'src',
11+
base: '/',
12+
cleanUrls: true,
13+
lang: 'en-US',
14+
appearance: 'dark',
15+
lastUpdated: true,
16+
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
17+
themeConfig: {
18+
logo: {
19+
light: '/logo-light.svg',
20+
dark: '/logo-dark.svg'
21+
},
22+
nav: navRoutes,
23+
sidebar: sidebarRoutes,
24+
socialLinks: [
25+
{ icon: 'github', link: 'https://github.com/sidebase' },
26+
{ icon: 'x', link: 'https://twitter.com/sidebase_io' },
27+
{ icon: 'discord', link: 'https://discord.gg/VzABbVsqAc' },
28+
],
29+
footer: {
30+
message: 'Released under the MIT License.',
31+
copyright: 'Developed by SIDESTREAM',
32+
},
33+
search: {
34+
provider: 'local',
35+
},
36+
editLink: {
37+
pattern: 'https://github.com/sidebase/docs/tree/main/src/:path',
38+
text: 'Edit this page on GitHub'
39+
}
40+
},
41+
})

.vitepress/routes/navbar.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { DefaultTheme } from 'vitepress'
2+
3+
export const routes: DefaultTheme.Config['nav'] = [
4+
{
5+
text: 'Development Kit',
6+
items: [
7+
{
8+
text: 'Getting started',
9+
link: '/sidebase/welcome',
10+
},
11+
{
12+
text: 'Components',
13+
link: '/sidebase/components',
14+
},
15+
{
16+
text: 'Resources',
17+
link: '/sidebase/resources',
18+
},
19+
],
20+
},
21+
{
22+
text: 'NuxtAuth',
23+
link: 'https://auth.sidebase.io'
24+
},
25+
]

.vitepress/routes/sidebar.ts

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import type { DefaultTheme } from 'vitepress'
2+
3+
export const routes: DefaultTheme.Config['sidebar'] = {
4+
'/sidebase': [
5+
{
6+
text: 'Welcome',
7+
base: '/sidebase/welcome',
8+
items: [
9+
{
10+
text: 'Introduction',
11+
link: '/',
12+
},
13+
{
14+
text: 'Stacks',
15+
link: '/stacks',
16+
},
17+
{
18+
text: 'Quick Start',
19+
link: '/quick-start',
20+
},
21+
{
22+
text: 'Getting Help',
23+
link: '/getting-help',
24+
},
25+
{
26+
text: 'FAQ',
27+
link: '/faq',
28+
},
29+
],
30+
},
31+
{
32+
text: 'Components',
33+
base: '/sidebase/components',
34+
items: [
35+
{
36+
text: 'Overview',
37+
link: '/',
38+
},
39+
{
40+
text: 'Nuxt 3',
41+
link: '/nuxt-3',
42+
},
43+
{
44+
text: 'Typescript',
45+
link: '/typescript',
46+
},
47+
{
48+
text: 'Prisma ORM',
49+
link: '/prisma',
50+
},
51+
{
52+
text: 'tRPC',
53+
link: '/trpc',
54+
},
55+
{
56+
text: 'Nuxt Auth',
57+
link: '/nuxt-auth',
58+
},
59+
{
60+
text: 'Tailwind CSS',
61+
link: '/tailwindcss',
62+
},
63+
],
64+
},
65+
{
66+
text: 'Resources',
67+
base: '/sidebase/resources',
68+
items: [
69+
{
70+
text: 'Overview',
71+
link: '/',
72+
},
73+
{
74+
text: 'Coding Setup',
75+
link: '/coding-setup',
76+
},
77+
{
78+
text: 'Breakpoint Debugging',
79+
link: '/breakpoint-debugging',
80+
},
81+
{
82+
text: 'Commands Cheat sheet',
83+
link: '/commands',
84+
},
85+
],
86+
},
87+
],
88+
}

0 commit comments

Comments
 (0)