Skip to content

Commit 25ee10e

Browse files
authored
Merge branch 'main' into update-pull-request
2 parents 0060358 + 355e865 commit 25ee10e

File tree

30 files changed

+1256
-361
lines changed

30 files changed

+1256
-361
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default defineConfig({
1414
lastUpdated: true,
1515
head: headConfig,
1616
sitemap: sitemapConfig,
17+
ignoreDeadLinks: 'localhostLinks',
1718
themeConfig: {
1819
logo: '/lock.png',
1920
outline: { level: 'deep' },

docs/.vitepress/head.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ export const headConfig: HeadConfig[] = [
1717
['meta', { property: 'og:locale', content: 'en' }],
1818
['meta', { property: 'og:image', content: OG_IMAGE_URL }],
1919
['meta', { property: 'og:url', content: HOST_NAME }],
20+
['script', { 'src': 'https://plausible.io/js/script.js', 'data-domain': 'auth.sidebase.io', 'defer': '' }]
2021
]

docs/.vitepress/routes/navbar.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ export const routes: DefaultTheme.Config['nav'] = [
1818
},
1919
],
2020
},
21-
// TODO: Add full API docs
22-
// { text: 'API', link: '/api/overview' },
2321
{
2422
text: 'Resources',
2523
items: [
2624
{
2725
text: 'Overview',
2826
link: '/resources/overview',
2927
},
28+
{
29+
text: 'Recipes',
30+
link: '/recipes/introduction/welcome',
31+
},
3032
{
3133
text: 'Security',
3234
link: '/resources/security',

docs/.vitepress/routes/sidebar.ts

Lines changed: 0 additions & 103 deletions
This file was deleted.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import type { DefaultTheme } from 'vitepress'
2+
3+
export const routes: DefaultTheme.SidebarItem[] = [
4+
{
5+
text: 'Getting started',
6+
base: '/guide/getting-started',
7+
items: [
8+
{
9+
text: 'Introduction',
10+
link: '/introduction',
11+
},
12+
{
13+
text: 'Installation',
14+
link: '/installation',
15+
},
16+
{
17+
text: 'Choosing the provider',
18+
link: '/choose-provider',
19+
},
20+
],
21+
},
22+
{
23+
text: 'Application side',
24+
base: '/guide/application-side',
25+
items: [
26+
{
27+
text: 'Configuration',
28+
link: '/configuration',
29+
},
30+
{
31+
text: 'Session access',
32+
link: '/session-access',
33+
},
34+
{
35+
text: 'Protecting pages',
36+
link: '/protecting-pages',
37+
},
38+
],
39+
},
40+
{
41+
text: 'AuthJS Provider',
42+
base: '/guide/authjs',
43+
items: [
44+
{
45+
text: 'Quick Start',
46+
link: '/quick-start',
47+
},
48+
{
49+
text: 'NuxtAuthHandler',
50+
link: '/nuxt-auth-handler',
51+
},
52+
{
53+
text: 'Custom pages',
54+
link: '/custom-pages',
55+
},
56+
{
57+
text: 'Session data',
58+
link: '/session-data',
59+
},
60+
{
61+
text: 'Server side',
62+
collapsed: true,
63+
items: [
64+
{ text: 'Session access', link: '/server-side/session-access' },
65+
{ text: 'JWT access', link: '/server-side/jwt-access' },
66+
{ text: 'Rest API', link: '/server-side/rest-api' },
67+
],
68+
},
69+
],
70+
},
71+
{
72+
text: 'Local / Refresh Provider',
73+
base: '/guide/local',
74+
items: [
75+
{
76+
text: 'Quick Start',
77+
link: '/quick-start',
78+
},
79+
{
80+
text: 'Session data',
81+
link: '/session-data',
82+
}
83+
],
84+
},
85+
{
86+
text: 'Advanced',
87+
base: '/guide/advanced',
88+
items: [
89+
{
90+
text: 'Deployment',
91+
collapsed: true,
92+
items: [
93+
{ text: 'Self-hosted', link: '/deployment/self-hosted' },
94+
{ text: 'Vercel', link: '/deployment/vercel' },
95+
{ text: 'Netlify', link: '/deployment/netlify' },
96+
],
97+
},
98+
{ text: 'Caching', link: '/caching' },
99+
],
100+
},
101+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { DefaultTheme } from 'vitepress'
2+
3+
import { routes as guideRoutes } from './guide'
4+
import { routes as recipesRoutes } from './recipes'
5+
6+
export const routes: DefaultTheme.Config['sidebar'] = {
7+
'/guide': guideRoutes,
8+
'/recipes': recipesRoutes
9+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import type { DefaultTheme } from 'vitepress'
2+
3+
export const routes: DefaultTheme.SidebarItem[] = [
4+
{
5+
text: 'Introduction',
6+
base: '/recipes/introduction',
7+
items: [
8+
{
9+
text: 'Welcome',
10+
link: '/welcome',
11+
},
12+
{
13+
text: 'Adding your recipe',
14+
link: '/adding-your-recipe',
15+
}
16+
],
17+
},
18+
{
19+
text: 'Official',
20+
base: '/recipes/official',
21+
items: [
22+
{
23+
text: 'Mocking with Vitest',
24+
link: '/mocking-with-vitest',
25+
},
26+
],
27+
},
28+
{
29+
text: 'Community',
30+
base: '/recipes/community',
31+
items: [
32+
{
33+
text: 'Strapi',
34+
link: '/strapi'
35+
},
36+
{
37+
text: 'Directus',
38+
link: '/directus',
39+
},
40+
{
41+
text: 'Laravel Passport',
42+
link: '/laravel-passport'
43+
}
44+
],
45+
},
46+
]

docs/.vitepress/theme/Layout.vue renamed to docs/.vitepress/theme/components/Layout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup>
22
import DefaultTheme from 'vitepress/theme'
3-
import GithubStarsButton from './components/GithubStarsButton.vue'
4-
import Banner from './components/Banner.vue'
3+
import GithubStarsButton from './GithubStarsButton.vue'
4+
import Banner from './Banner.vue'
55
66
const { Layout } = DefaultTheme
77
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<script lang="ts" setup>
2+
import Tag from './Tag.vue'
3+
4+
type RecipeType = 'official' | 'community'
5+
type RecipeProviders = 'authjs' | 'local' | 'refresh'
6+
7+
withDefaults(defineProps<{
8+
type?: RecipeType
9+
providers?: RecipeProviders[]
10+
tags?: string[]
11+
author?: string
12+
}>(), {
13+
type: 'community',
14+
providers: () => ['authjs', 'local', 'refresh'],
15+
tags: () => []
16+
})
17+
</script>
18+
19+
<template>
20+
<hr>
21+
<div class="RecipeHeader">
22+
<div class="Tags">
23+
<Tag v-if="type === 'official'" text="official" type="official" />
24+
<Tag v-else text="community" type="community" />
25+
<Tag v-for="provider in providers" :key="provider" :text="provider" :type="provider" />
26+
<Tag v-for="tag in tags" :key="tag" :text="tag" type="info" />
27+
</div>
28+
<a v-if="author" class="Avatar" :href="`https://github.com/${author}`" target="_blank" rel="noreferrer noopener">
29+
<span>{{ author }}</span>
30+
<img :src="`https://github.com/${author}.png?size=100`" />
31+
</a>
32+
</div>
33+
<hr>
34+
</template>
35+
36+
<style scoped>
37+
.RecipeHeader {
38+
display: flex;
39+
align-items: center;
40+
justify-content: space-between;
41+
column-gap: 0.5rem;
42+
43+
margin-top: 10px;
44+
margin-bottom: 10px;
45+
}
46+
.Avatar {
47+
display: flex;
48+
align-items: center;
49+
justify-content: space-between;
50+
column-gap: 0.5rem;
51+
}
52+
.Avatar span {
53+
font-size: 14px;
54+
font-weight: 600;
55+
}
56+
.Avatar img {
57+
border-radius: 50%;
58+
height: 25px;
59+
width: 25px;
60+
}
61+
.Tags {
62+
display: flex;
63+
align-items: center;
64+
justify-content: space-between;
65+
column-gap: 0.1rem;
66+
}
67+
</style>

0 commit comments

Comments
 (0)