Skip to content

Commit 9c10391

Browse files
committed
chore: init
0 parents  commit 9c10391

17 files changed

+8921
-0
lines changed

.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# License to build Nuxt UI Pro in production, https://ui.nuxt.com/pro/purchase
2+
NUXT_UI_PRO_LICENSE=

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example

.npmrc

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

README.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Nuxt UI Pro: Landing
2+
3+
Look at [Nuxt docs](https://nuxt.com/docs/getting-started/introduction) and [Nuxt UI Pro docs](https://ui.nuxt.com/pro) to learn more.
4+
5+
## Setup
6+
7+
Make sure to install the dependencies:
8+
9+
```bash
10+
# npm
11+
npm install
12+
13+
# pnpm
14+
pnpm install
15+
16+
# yarn
17+
yarn install
18+
19+
# bun
20+
bun install
21+
```
22+
23+
## Development Server
24+
25+
Start the development server on `http://localhost:3000`:
26+
27+
```bash
28+
# npm
29+
npm run dev
30+
31+
# pnpm
32+
pnpm run dev
33+
34+
# yarn
35+
yarn dev
36+
37+
# bun
38+
bun run dev
39+
```
40+
41+
## Production
42+
43+
Build the application for production:
44+
45+
```bash
46+
# npm
47+
npm run build
48+
49+
# pnpm
50+
pnpm run build
51+
52+
# yarn
53+
yarn build
54+
55+
# bun
56+
bun run build
57+
```
58+
59+
Locally preview production build:
60+
61+
```bash
62+
# npm
63+
npm run preview
64+
65+
# pnpm
66+
pnpm run preview
67+
68+
# yarn
69+
yarn preview
70+
71+
# bun
72+
bun run preview
73+
```
74+
75+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

app.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default defineAppConfig({
2+
ui: {
3+
primary: 'emerald',
4+
gray: 'slate',
5+
}
6+
})

app.vue

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<script setup>
2+
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
3+
const { data: files } = useLazyFetch('/api/search.json', {
4+
default: () => [],
5+
server: false,
6+
})
7+
</script>
8+
9+
<template>
10+
<UHeader title="My Docs">
11+
<template #right>
12+
<UButton to="https://ui.nuxt.com/pro" icon="i-heroicons-book-open" target="_blank" color="gray" variant="ghost" />
13+
<UColorModeButton />
14+
</template>
15+
</UHeader>
16+
<NuxtLayout>
17+
<NuxtPage />
18+
</NuxtLayout>
19+
<UFooter />
20+
<ClientOnly>
21+
<LazyUDocsSearch ref="search" :files="files" :navigation="navigation" />
22+
</ClientOnly>
23+
</template>

content/index.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: 'Introduction'
3+
description: 'Welcome to Nuxt UI Pro documentation template.'
4+
---
5+
6+
## Features
7+
8+
- Write pages in Markdown with [Nuxt Content](https://content.nuxt.com)
9+
- Auto-generated sidebar navigation
10+
- Beautiful Typography
11+
- Surround navigation
12+
- Multi-level sidebar
13+
- Powered by [Nuxt 3](https://nuxt.com)
14+
- And more...

content/usage.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Usage
3+
description: 'Welcome to Nuxt UI Pro documentation template.'
4+
---
5+
6+
## Installation
7+
8+
1. Open https://github.com/nuxt-ui-pro/docs
9+
2. Click on "Use this template" button
10+
3. Enter repository name and click on "Create repository from template" button
11+
4. Clone your new repository
12+
5. Install dependencies with your favorite package manager
13+
6. Start development server
14+

layouts/default.vue

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<script setup>
2+
const { data: navigation } = useNuxtData('navigation')
3+
</script>
4+
5+
<template>
6+
<UMain>
7+
<UContainer>
8+
<UPage>
9+
<template #left>
10+
<UAside>
11+
<template #top>
12+
<UDocsSearchButton size="md" />
13+
</template>
14+
<UNavigationTree :links="mapContentNavigation(navigation)" />
15+
</UAside>
16+
</template>
17+
<slot />
18+
</UPage>
19+
</UContainer>
20+
</UMain>
21+
</template>

nuxt.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// https://nuxt.com/docs/api/configuration/nuxt-config
2+
export default defineNuxtConfig({
3+
devtools: { enabled: true },
4+
extends: '@nuxt/ui-pro',
5+
modules: [
6+
'@nuxt/ui',
7+
'@nuxt/content'
8+
],
9+
ui: {
10+
icons: ['ph', 'simple-icons']
11+
}
12+
})

package.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "nuxt-app",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"build": "nuxt build",
7+
"dev": "nuxt dev",
8+
"generate": "nuxt generate",
9+
"preview": "nuxt preview",
10+
"postinstall": "nuxt prepare"
11+
},
12+
"dependencies": {
13+
"@iconify-json/ph": "^1.1.6",
14+
"@iconify-json/simple-icons": "^1.1.74",
15+
"@nuxt/content": "^2.8.5",
16+
"@nuxt/ui-pro": "^0.2.1",
17+
"nuxt": "^3.7.4"
18+
},
19+
"devDependencies": {
20+
"@nuxt/devtools": "^1.0.0-beta.0",
21+
"typescript": "^5.2.2"
22+
}
23+
}

pages/[...slug].vue

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<script setup lang="ts">
2+
const route = useRoute()
3+
4+
const { data: page } = await useAsyncData(`docs-${route.path}`, () => queryContent(route.path).findOne())
5+
if (!page.value)
6+
throw createError({ statusCode: 404, statusMessage: 'Page not found' })
7+
8+
const { data: surround } = await useAsyncData(`docs-${route.path}-surround`, () => queryContent()
9+
.where({ _extension: 'md', navigation: { $ne: false } })
10+
.findSurround(route.path.endsWith('/') ? route.path.slice(0, -1) : route.path),
11+
)
12+
const isProvider = page.value._path.startsWith('/providers')
13+
14+
useSeoMeta({
15+
titleTemplate: isProvider ? '%s - Nuxt Image Providers' : '%s - Nuxt Image',
16+
title: page.value.title,
17+
ogTitle: `${page.value.title} - ${isProvider ? 'Nuxt Image Providers' : 'Nuxt Image'}`,
18+
description: page.value.description,
19+
ogDescription: page.value.description
20+
})
21+
22+
const headline = computed(() => findPageHeadline(page.value))
23+
const communityLinks = computed(() => [
24+
{
25+
icon: 'i-ph-pen-duotone',
26+
label: 'Edit this page',
27+
to: `https://github.com/nuxt-ui-pro/docs/edit/main/docs/content/${page?.value?._file}`,
28+
target: '_blank',
29+
},
30+
{
31+
icon: 'i-ph-shooting-star-duotone',
32+
label: 'Star on GitHub',
33+
to: 'https://github.com/nuxt/ui',
34+
target: '_blank',
35+
},
36+
{
37+
icon: 'i-simple-icons-nuxtdotjs',
38+
label: 'Purchase UI Pro',
39+
to: 'https://ui.nuxt.com/pro/purchase',
40+
target: '_blank',
41+
},
42+
])
43+
</script>
44+
45+
<template>
46+
<UPage>
47+
<UPageHeader :title="page.title" :description="page.description" :links="page.links" :headline="headline" />
48+
49+
<UPageBody prose class="pb-0">
50+
<ContentRenderer v-if="page.body" :value="page" />
51+
<hr v-if="surround?.length" class="my-8">
52+
<UDocsSurround :surround="surround" />
53+
</UPageBody>
54+
55+
<template v-if="page.body?.toc?.links?.length" #right>
56+
<UDocsToc :links="page.body.toc.links">
57+
<template #bottom>
58+
<div class="hidden lg:block space-y-6 !mt-6">
59+
<UDivider v-if="page.body?.toc?.links?.length" dashed />
60+
<UPageLinks title="Community" :links="communityLinks" />
61+
</div>
62+
</template>
63+
</UDocsToc>
64+
</template>
65+
</UPage>
66+
</template>

0 commit comments

Comments
 (0)