Skip to content

Commit 0a51b59

Browse files
committed
docs-#558: refactor docs new version
1 parent 08eaa67 commit 0a51b59

Some content is hidden

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

61 files changed

+8290
-609
lines changed

docs/.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# To use Nuxt UI Pro in production
2+
NUXT_UI_PRO_LICENSE=
3+
4+
# Used when pre-rendering the docs for dynamic OG images
5+
NUXT_PUBLIC_SITE_URL=

docs/.gitignore

100755100644
-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ dist
1010
sw.*
1111
.env
1212
.output
13-
yarn.lock

docs/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
shamefully-hoist=true
2+
strict-peer-dependencies=false

docs/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Nuxt Security docs
2+
3+
Docs template with [Nuxt UI](https://ui.nuxt.com).
4+
5+
## Setup
6+
7+
Install dependencies inside `docs/`:
8+
9+
```bash
10+
yarn
11+
```
12+
13+
## Development
14+
15+
```bash
16+
yarn dev
17+
```
18+
19+
## Static Generation
20+
21+
Use the `generate` command to build your application.
22+
23+
The HTML files will be generated in the .output/public directory and ready to be deployed to any static compatible hosting.
24+
25+
```bash
26+
yarn generate
27+
```
28+
29+
## Preview build
30+
31+
You might want to preview the result of your build locally, to do so, run the following command:
32+
33+
```bash
34+
yarn preview
35+
```

docs/app.config.ts

+24-37
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,28 @@
11
export default defineAppConfig({
2-
github: {
3-
owner: 'Baroshem',
4-
repo: 'nuxt-security',
5-
branch: 'main'
6-
},
7-
docus: {
8-
title: 'Nuxt Security',
9-
description: '🛡️ Security Module for Nuxt based on HTTP Headers and Middleware',
10-
image: '/preview.jpg',
11-
url: 'https://nuxt-security.vercel.app',
12-
socials: {
13-
twitter: 'jacobandrewsky',
14-
github: 'baroshem/nuxt-security',
15-
nuxt: {
16-
label: 'Nuxt',
17-
icon: 'simple-icons:nuxtdotjs',
18-
href: 'https://nuxt.com'
19-
}
20-
},
21-
aside: {
22-
level: 1
23-
},
24-
github: {
25-
dir: 'docs/content',
26-
root: 'docs/content',
27-
edit: true,
28-
releases: true,
29-
owner: 'baroshem',
30-
repo: 'nuxt-security',
31-
branch: 'main'
2+
ui: {
3+
primary: 'green',
4+
gray: 'slate',
5+
button: {
6+
color: {
7+
white: {
8+
link: 'text-white dark:text-white hover:text-gray-300 dark:hover:text-gray-300 underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-gray-500 dark:focus-visible:ring-gray-400 transition-all duration-200',
9+
},
10+
transparent: {
11+
outline: 'ring-1 ring-inset ring-gray-700 text-white dark:text-white hover:bg-gray-900 disabled:bg-gray-300 dark:hover:bg-gray-900 dark:disabled:bg-gray-300 focus-visible:ring-2 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-400',
12+
},
13+
},
3214
},
33-
cover: {
34-
src: '/preview.png',
35-
alt: 'Security Module for Nuxt based on HTTP Headers and Middleware'
15+
},
16+
elements: {
17+
variables: {
18+
light: {
19+
background: '255 255 255',
20+
foreground: 'var(--color-gray-700)',
21+
},
22+
dark: {
23+
background: 'var(--color-gray-950)',
24+
foreground: 'var(--color-gray-200)',
25+
},
3626
},
37-
header: {
38-
logo: true
39-
}
40-
}
27+
},
4128
})

docs/app.vue

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<script setup>
2+
useServerSeoMeta({
3+
ogSiteName: 'Nuxt Security',
4+
twitterCard: 'summary_large_image',
5+
})
6+
useHead({
7+
htmlAttrs: {
8+
lang: 'en',
9+
},
10+
})
11+
const links = [
12+
{
13+
label: 'Documentation',
14+
to: '/getting-started/installation',
15+
},
16+
{
17+
label: 'Playground',
18+
to: '/playground',
19+
},
20+
{
21+
label: 'Releases',
22+
to: 'https://github.com/Baroshem/nuxt-security/releases',
23+
target: '_blank',
24+
},
25+
]
26+
const { data: files } = useLazyFetch('/api/search.json', {
27+
default: () => [],
28+
server: false,
29+
})
30+
const { data: navigation } = await useAsyncData('navigation', () =>
31+
fetchContentNavigation(),
32+
)
33+
34+
// Provide
35+
provide('navigation', navigation)
36+
</script>
37+
38+
<template>
39+
<UHeader :links="links">
40+
<template #logo>
41+
<Logo />
42+
</template>
43+
44+
<template #right>
45+
<UColorModeButton v-if="!$colorMode.forced" />
46+
<UButton
47+
aria-label="Nuxt Website"
48+
icon="i-simple-icons-nuxtdotjs"
49+
to="https://nuxt.com"
50+
target="_blank"
51+
color="gray"
52+
variant="ghost"
53+
/>
54+
<UButton
55+
aria-label="Nuxt on X"
56+
icon="i-simple-icons-x"
57+
to="https://x.com/nuxt_js"
58+
target="_blank"
59+
color="gray"
60+
variant="ghost"
61+
/>
62+
<UButton
63+
aria-label="Nuxt Security on GitHub"
64+
icon="i-simple-icons-github"
65+
to="https://github.com/Baroshem/nuxt-security"
66+
target="_blank"
67+
color="gray"
68+
variant="ghost"
69+
/>
70+
</template>
71+
<!-- Mobile panel -->
72+
<template
73+
v-if="$route.path !== '/'"
74+
#panel
75+
>
76+
<LazyUDocsSearchButton
77+
size="md"
78+
class="mb-4 w-full"
79+
/>
80+
<LazyUNavigationTree
81+
:links="mapContentNavigation(navigation)"
82+
default-open
83+
:multiple="false"
84+
/>
85+
</template>
86+
</UHeader>
87+
88+
<NuxtLayout>
89+
<NuxtPage />
90+
</NuxtLayout>
91+
92+
<UFooter :links="links">
93+
<template #left>
94+
<span class="text-sm">
95+
Published under
96+
<NuxtLink
97+
to="https://github.com/Baroshem/nuxt-security"
98+
target="_blank"
99+
class="underline"
100+
>MIT License</NuxtLink>
101+
</span>
102+
</template>
103+
<template #right>
104+
<UColorModeButton v-if="!$colorMode.forced" />
105+
<UButton
106+
aria-label="Nuxt Website"
107+
icon="i-simple-icons-nuxtdotjs"
108+
to="https://nuxt.com"
109+
target="_blank"
110+
color="gray"
111+
variant="ghost"
112+
/>
113+
<UButton
114+
aria-label="Nuxt on X"
115+
icon="i-simple-icons-x"
116+
to="https://x.com/nuxt_js"
117+
target="_blank"
118+
color="gray"
119+
variant="ghost"
120+
/>
121+
<UButton
122+
aria-label="Nuxt Security on GitHub"
123+
icon="i-simple-icons-github"
124+
to="https://github.com/Baroshem/nuxt-security"
125+
target="_blank"
126+
color="gray"
127+
variant="ghost"
128+
/>
129+
</template>
130+
</UFooter>
131+
<ClientOnly>
132+
<LazyUDocsSearch
133+
:files="files"
134+
:navigation="navigation"
135+
:links="links"
136+
/>
137+
</ClientOnly>
138+
</template>
File renamed without changes.
File renamed without changes.

docs/components/content/Releases.vue

-20
This file was deleted.

0 commit comments

Comments
 (0)