Skip to content

Commit 77116ca

Browse files
committed
feat(docs): initial documentation
1 parent b235d84 commit 77116ca

27 files changed

+4730
-1729
lines changed

_demo/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"preview": "nuxi preview"
88
},
99
"dependencies": {
10-
"@iconify-json/simple-icons": "^1.1.90",
10+
"@iconify-json/simple-icons": "^1.1.92",
1111
"@nuxt/ui": "^2.13.0",
1212
"drizzle-orm": "^0.29.3",
13-
"nuxt": "^3.10.0",
13+
"nuxt": "^3.10.2",
1414
"@atinux/nuxthub": "latest"
1515
},
1616
"devDependencies": {

docs/.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase
2+
NUXT_UI_PRO_LICENSE=
3+
4+
# Public URL, used for OG Image when running nuxt generate
5+
NUXT_PUBLIC_SITE_URL=

docs/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shamefully-hoist=true

docs/app.config.ts

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
export default defineAppConfig({
2+
ui: {
3+
primary: 'emerald',
4+
gray: 'cool',
5+
footer: {
6+
bottom: {
7+
left: 'text-sm text-gray-500 dark:text-gray-400',
8+
wrapper: 'border-t border-gray-200 dark:border-gray-800'
9+
}
10+
}
11+
},
12+
seo: {
13+
siteName: 'NuxtHub',
14+
},
15+
header: {
16+
logo: {
17+
alt: '',
18+
light: '',
19+
dark: ''
20+
},
21+
search: true,
22+
colorMode: true,
23+
links: [{
24+
icon: 'i-simple-icons-github',
25+
to: 'https://github.com/atinux/nuxthub',
26+
target: '_blank',
27+
'aria-label': 'NuxtHub'
28+
}]
29+
},
30+
footer: {
31+
credits: 'Copyright © 2024',
32+
colorMode: false,
33+
links: [{
34+
icon: 'i-simple-icons-nuxtdotjs',
35+
to: 'https://nuxt.com',
36+
target: '_blank',
37+
'aria-label': 'Nuxt Website'
38+
}, {
39+
icon: 'i-simple-icons-discord',
40+
to: 'https://discord.com/invite/ps2h6QT',
41+
target: '_blank',
42+
'aria-label': 'Nuxt UI on Discord'
43+
}, {
44+
icon: 'i-simple-icons-x',
45+
to: 'https://x.com/nuxt_js',
46+
target: '_blank',
47+
'aria-label': 'Nuxt on X'
48+
}, {
49+
icon: 'i-simple-icons-github',
50+
to: 'https://github.com/atinux/nuxthub',
51+
target: '_blank',
52+
'aria-label': 'NuxtHub on GitHub'
53+
}]
54+
},
55+
toc: {
56+
title: 'Table of Contents',
57+
bottom: {
58+
title: 'Community',
59+
edit: 'https://github.com/atinux/nuxthub/edit/main/content',
60+
links: [{
61+
icon: 'i-heroicons-star',
62+
label: 'Star on GitHub',
63+
to: 'https://github.com/atinux/nuxthub',
64+
target: '_blank',
65+
}]
66+
}
67+
}
68+
})

docs/app.vue

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<script setup lang="ts">
2+
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
3+
4+
const { seo } = useAppConfig()
5+
6+
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
7+
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
8+
default: () => [],
9+
server: false
10+
})
11+
12+
useHead({
13+
meta: [
14+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
15+
],
16+
link: [
17+
{ rel: 'icon', href: '/favicon.ico' }
18+
],
19+
htmlAttrs: {
20+
lang: 'en'
21+
}
22+
})
23+
24+
useSeoMeta({
25+
ogSiteName: seo?.siteName,
26+
twitterCard: 'summary_large_image'
27+
})
28+
29+
provide('navigation', navigation)
30+
</script>
31+
32+
<template>
33+
<div>
34+
<Header />
35+
36+
<UMain>
37+
<NuxtLayout>
38+
<NuxtPage />
39+
</NuxtLayout>
40+
</UMain>
41+
42+
<Footer />
43+
44+
<ClientOnly>
45+
<LazyUDocsSearch :files="files" :navigation="navigation" />
46+
</ClientOnly>
47+
48+
<UNotifications />
49+
</div>
50+
</template>

docs/components/Footer.vue

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<script setup lang="ts">
2+
const { footer } = useAppConfig()
3+
</script>
4+
5+
<template>
6+
<UFooter>
7+
<template #left>
8+
{{ footer.credits }}
9+
</template>
10+
11+
<template #right>
12+
<UColorModeButton v-if="footer?.colorMode" />
13+
14+
<template v-if="footer?.links">
15+
<UButton
16+
v-for="(link, index) of footer?.links"
17+
:key="index"
18+
v-bind="{ color: 'gray', variant: 'ghost', ...link }"
19+
/>
20+
</template>
21+
</template>
22+
</UFooter>
23+
</template>

docs/components/Header.vue

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<script setup lang="ts">
2+
import type { NavItem } from '@nuxt/content/dist/runtime/types'
3+
4+
const navigation = inject<NavItem[]>('navigation', [])
5+
6+
const { header } = useAppConfig()
7+
</script>
8+
9+
<template>
10+
<UHeader>
11+
<template #logo>
12+
<template v-if="header?.logo?.dark || header?.logo?.light">
13+
<UColorModeImage v-bind="{ class: 'h-6 w-auto', ...header?.logo }" />
14+
</template>
15+
<template v-else>
16+
<Logo />
17+
</template>
18+
</template>
19+
20+
<template v-if="header?.search" #center>
21+
<UDocsSearchButton class="hidden lg:flex" />
22+
</template>
23+
24+
<template #right>
25+
<UDocsSearchButton v-if="header?.search" :label="null" class="lg:hidden" />
26+
27+
<UColorModeButton v-if="header?.colorMode" />
28+
29+
<template v-if="header?.links">
30+
<UButton
31+
v-for="(link, index) of header.links"
32+
:key="index"
33+
v-bind="{ color: 'gray', variant: 'ghost', ...link }"
34+
/>
35+
</template>
36+
</template>
37+
38+
<template #panel>
39+
<UNavigationTree :links="mapContentNavigation(navigation)" />
40+
</template>
41+
</UHeader>
42+
</template>

docs/components/Logo.vue

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template>
2+
<div class="flex items-center gap-1">
3+
<span>Nuxt</span>
4+
<span class="rounded-md bg-primary-500 text-gray-900 px-0.5">Hub</span>
5+
</div>
6+
</template>
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script lang="ts" setup>
2+
defineOptions({
3+
inheritAttrs: false
4+
})
5+
6+
defineProps({
7+
title: {
8+
type: String,
9+
required: true
10+
},
11+
description: {
12+
type: String,
13+
required: true
14+
}
15+
})
16+
</script>
17+
18+
<template>
19+
<div class="w-full h-full flex flex-col justify-center text-center bg-slate-900 p-8">
20+
<div class="relative">
21+
<h1 class="text-8xl mb-4 text-white">
22+
{{ title }}
23+
</h1>
24+
<p class="text-5xl text-gray-200 leading-tight">
25+
{{ description }}
26+
</p>
27+
</div>
28+
</div>
29+
</template>
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Introduction
3+
description: Welcome to NuxtHub documentation.
4+
---
5+
6+
This template is a ready-to-use documentation template made with [Nuxt UI Pro](https://ui.nuxt.com/pro), a collection of premium components built on top of [Nuxt UI](https://ui.nuxt.com) to create beautiful & responsive Nuxt applications in minutes.
7+
8+
There are already many websites based on this template:
9+
10+
- [Nuxt](https://nuxt.com) - The Nuxt website
11+
- [Nuxt UI](https://ui.nuxt.com) - The documentation of `@nuxt/ui` and `@nuxt/ui-pro`
12+
- [Nuxt Image](https://image.nuxt.com) - The documentation of `@nuxt/image`
13+
- [Nuxt Content](https://content.nuxt.com) - The documentation of `@nuxt/content`
14+
- [Nuxt Devtools](https://devtools.nuxt.com) - The documentation of `@nuxt/devtools`
15+
- [Nuxt Studio](https://nuxt.studio) - The pro version of Nuxt Content
16+
17+
## Features
18+
19+
- Powered by [Nuxt 3](https://nuxt.com)
20+
- Built with [Nuxt UI](https://ui.nuxt.com) and [Nuxt UI Pro](https://ui.nuxt.com/pro)
21+
- Write content with [MDC syntax](https://content.nuxt.com/usage/markdown) thanks to [Nuxt Content](https://content.nuxt.com)
22+
- Compatible with [Nuxt Studio](https://nuxt.studio)
23+
- Auto-generated sidebar navigation
24+
- Full-Text Search out of the box
25+
- Beautiful Typography styles
26+
- Dark mode support
27+
- And more...
28+
29+
## Play online
30+
31+
You can start playing with this template in your browser using our online sandboxes:
32+
33+
::u-button
34+
---
35+
class: mr-4
36+
icon: i-simple-icons-stackblitz
37+
label: Play on StackBlitz
38+
target: _blank
39+
to: https://stackblitz.com/github/nuxt-ui-pro/docs/
40+
---
41+
::
42+
43+
::u-button
44+
---
45+
class: mt-2 sm:mt-0
46+
icon: i-simple-icons-codesandbox
47+
label: Play on CodeSandbox
48+
target: _blank
49+
to: https://codesandbox.io/s/github/nuxt-ui-pro/docs/
50+
---
51+
::
52+
53+
Or open [Nuxt UI playground](https://ui.nuxt.com/playground).
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: Getting Started

docs/content/index.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
title: 'NuxtHub'
2+
description: 'Welcome to NuxtHub documentation.'
3+
navigation: false
4+
hero:
5+
title: 'Full Stack Nuxt app in the Edge'
6+
description: 'Deploy a Full Stack Nuxt app using NuxtHub powered by CloudFlare'
7+
orientation: horizontal
8+
links:
9+
- label: Get started
10+
icon: i-heroicons-arrow-right-20-solid
11+
trailing: true
12+
to: '/getting-started'
13+
size: lg
14+
- label: Open on GitHub
15+
icon: i-simple-icons-github
16+
size: lg
17+
color: gray
18+
to: https://github.com/atinux/nuxthub
19+
target: _blank
20+
code: |
21+
```bash [Terminal]
22+
npx nuxthub deploy
23+
```
24+
features:
25+
title: 'All-in-one docs template'
26+
links:
27+
- label: Get started
28+
icon: i-heroicons-arrow-right-20-solid
29+
trailing: true
30+
to: '/getting-started'
31+
size: lg
32+
items:
33+
- title: 'Nuxt 3'
34+
description: 'Powered by Nuxt 3 for optimal performances and SEO.'
35+
icon: 'i-simple-icons-nuxtdotjs'
36+
to: 'https://nuxt.com'
37+
target: '_blank'
38+
- title: 'CloudFlare'
39+
description: 'Using CloudFlare pages for edge rendering.'
40+
icon: 'i-simple-icons-cloudflare'
41+
to: 'https://content.nuxt.com'
42+
target: '_blank'
43+
- title: 'NuxtHub Admin'
44+
description: 'Offers an admin to manage your project as a team.'
45+
icon: 'i-heroicons-user-group-solid'
46+
to: 'https://hub.nuxt.com'
47+
target: '_blank'
48+
- title: 'NuxtHub CLI'
49+
description: 'A powerful, yet simple, CLI to deploy in seconds on the edge.'
50+
icon: 'i-ph-terminal'

0 commit comments

Comments
 (0)