8000 docs: various improvements · nuxt-hub/core@3274bf0 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 3274bf0

Browse files
committed
docs: various improvements
1 parent 62661ad commit 3274bf0

22 files changed

+143
-113
lines changed

docs/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineAppConfig({
1515
siteName: 'NuxtHub'
1616
},
1717
toc: {
18-
title: 'Table of Contents',
18+
title: 'On this page',
1919
bottom: {
2020
edit: 'https://github.com/nuxt-hub/core/edit/main/docs/content'
2121
}

docs/components/AppFooter.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<script setup lang="ts">
22
const links = [
33
{
4-
label: 'Nuxt Docs',
5-
to: 'https://nuxt.com'
6-
}, {
74
label: 'Terms',
85
to: 'https://admin.hub.nuxt.com/terms',
96
target: '_blank'
@@ -27,6 +24,14 @@ const links = [
2724

2825
<template #right>
2926
<ColorScheme><UColorModeSelect /></ColorScheme>
27+
<UButton
28+
icon="i-simple-icons-discord"
29+
color="gray"
30+
variant="ghost"
31+
to="https://discord.gg/vW89dsVqBF"
32+
target="_blank"
33+
aria-label="Go to NuxtHub Discord server"
34+
/>
3035
<UButton
3136
icon="i-simple-icons-x" F438
3237
color="gray"

docs/components/PageSectionCTA.vue

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<template>
2+
<ULandingSection
3+
:ui="{
4+
wrapper: 'mt-10 py-12 sm:py-12 not-prose relative',
5+
container: 'gap-8 sm:gap-y-8',
6+
title: 'lg:text-4xl font-semibold'
7+
}"
8+
:links="[
9+
{
10+
label: 'Get started for free',
11+
to: 'https://admin.hub.nuxt.com',
12+
trailingIcon: 'i-ph-arrow-right'
13+
},
14+
{
15+
label: 'Read docs',
16+
to: '/docs/getting-started',
17+
variant: 'ghost',
18+
color: 'gray'
19+
}
20+
]"
21+
>
22+
<svg class="absolute top-0 inset-x-0 pointer-events-none" viewBox="0 0 1017 181" fill="none" xmlns="http://www.w3.org/2000/svg">
23+
<g opacity="0.5">
24+
<mask id="path-1-inside-1_846_160841" fill="white">
25+
<path d="M0 0H1017V181H0V0Z" />
26+
</mask>
27+
<path d="M0 0H1017V181H0V0Z" fill="url(#paint0_radial_846_160841)" fill-opacity="0.22" />
28+
<path d="M0 2H1017V-2H0V2Z" fill="url(#paint1_linear_846_160841)" mask="url(#path-1-inside-1_846_160841)" />
29+
</g>
30+
<defs>
31+
<radialGradient id="paint0_radial_846_160841" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(508.999 19.5) rotate(90.177) scale(161.501 509.002)">
32+
<stop stop-color="#00DC82" />
33+
<stop offset="1" stop-color="#00DC82" stop-opacity="0" />
34+
</radialGradient>
35+
<linearGradient id="paint1_linear_846_160841" x1="10.9784" y1="91" x2="1017" y2="90.502" gradientUnits="userSpaceOnUse">
36+
<stop stop-color="#00DC82" stop-opacity="0" />
37+
<stop offset="0.395" stop-color="#00DC82" />
38+
<stop offset="1" stop-color="#00DC82" stop-opacity="0" />
39+
</linearGradient>
40+
</defs>
41+
</svg>
42+
43+
<template #title>
44+
<span>Start with NuxtHub <span class="text-primary">today</span></span>
45+
</template>
46+
</ULandingSection>
47+
</template>

docs/content/0.index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ hero:
1414
to: /blog/cloudflare-ai-for-user-experience
1515
icon: i-ph-arrow-right
1616
links:
17-
- label: Get started
17+
- label: Start reading docs
1818
trailing-icon: i-ph-arrow-right
1919
to: '/docs/getting-started'
2020
size: md

docs/content/1.docs/1.getting-started/1.index.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,54 @@ navigation:
33
title: Introduction
44
title: What is NuxtHub?
55
description: NuxtHub helps you build and deploy full-stack Nuxt applications globally.
6+
links:
7+
- label: '3min video'
8+
to: https://www.youtube.com/watch?v=hlmPqDkc3_s
9+
target: _blank
10+
icon: i-ph-play-circle
611
---
712

813
On top of deploying your Nuxt application, NuxtHub aims to provide a complete backend experience on top of the framework, allowing developers to build full-stack applications on the Edge, read more about [Nuxt on the Edge](https://nuxt.com/blog/nuxt-on-the-edge).
914

10 C95D 15
It leverages Cloudflare features such as Pages, Workers Analytics, AI, KV, D1, R2 and more.
1116

12-
::tip
17+
::callout
1318
**NuxtHub is what Vercel / Netlify is for AWS, but for Cloudflare.** :br
1419
It also deploys to your Cloudflare account so you stay in control of your data and billing as we don't mark-up Cloudflare prices.
1520
::
1621

17-
::callout
18-
---
19-
color: red
20-
icon: i-logos-youtube-icon
21-
target: _blan
22-
to: https://www.youtube.com/watch?v=hlmPqDkc3_s
23-
---
24-
Watch a 3 minute introduction video by **LearnVue**.
25-
::
26-
2722
## Features
2823

2924
NuxtHub provides optional features to help you build full-stack applications:
3025

31-
- [AI Models](/docs/features/ai) to run machine learning models, such as LLMs in Nuxt.
32-
- [Blob storage](/docs/features/blob) to store static assets, such as images, videos and more
33-
- [Caching system](/docs/features/cache) for your Nuxt pages, API routes or server functions
34-
- [SQL database](/docs/features/database) to store your application's data
35-
- [Key-Value](/docs/features/kv) to store JSON data accessible globally with low-latency
36-
- [Open API](/docs/features/open-api) to generate your API documentation with [Scalar](https://scalar.com)
26+
::card-group
27+
:::card{icon="i-ph-magic-wand" title="AI Models" to="/docs/features/ai"}
28+
Run machine learning models, such as LLMs.
29+
:::
30+
31+
:::card{icon="i-ph-shapes" title="Blob" to="/docs/features/blob"}
32+
Store static assets, such as images, videos and more
33+
:::
34+
35+
:::card{icon="i-ph-lightning" title="Cache" to="/docs/features/cache"}
36+
Caching system for your Nuxt pages, API routes or server functions
37+
:::
38+
39+
:::card{icon="i-ph-database" title="SQL database" to="/docs/features/database"}
40+
Store your application's data in a secure and scalable serverless SQL database.
41+
:::
42+
:::card{icon="i-ph-coin" title="Key-Value" to="/docs/features/kv"}
43+
Key-Value to store JSON data accessible globally with low-latency
44+
:::
45+
46+
:::card{icon="i-ph-plugs-connected" title="Remote Access" to="/docs/getting-started/remote-storage"}
47+
Connect to your project's resources from your local environment.
48+
:::
3749

38-
::tip
39-
---
40-
icon: i-ph-plugs-connected-duotone
41-
to: /docs/getting-started/remote-storage
42-
---
43-
NuxtHub comes with a powerful proxy system to connect to your project's resources from your local environment, allowing you to work with your remote storage as if it was local with `npx nuxi dev --remote`.
4450
::
4551

46-
## NuxtHub Admin
52+
53+
## Dashboard
4754

4855
::tabs
4956
:::div{label="Projects"}
@@ -113,9 +120,9 @@ NuxtHub also integrates with the [Nuxt DevTools](https://devtools.nuxt.com/) to
113120
:::
114121
::
115122

116-
## Upcoming Packages
123+
## Upcoming
117124

118-
We plan to provide a complete backend experience for Nuxt apps through various `@nuxthub` packages.
125+
NuxtHub is built with a modular approach:
119126

120127
- [`@nuxthub/core`](https://github.com/nuxt-hub/core): Main package to provide storage features
121128
- `@nuxthub/auth`: Add authentication for user management (soon)
@@ -124,6 +131,6 @@ We plan to provide a complete backend experience for Nuxt apps through various `
124131
- `@nuxthub/analytics`: Understand your traffic and track events within your application and API (soon)
125132
- `@nuxthub/...`: You name it!
126133

127-
::important
134+
::callout
128135
We are currently in the early stages of development (beta) and are looking for feedback from the community. If you are interested in contributing, please join us on [nuxt-hub/core](https://github.com/nuxt-hub/core).
129136
::

docs/content/4.changelog.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ hero:
99
- label: '@nuxt_hub'
1010
icon: i-simple-icons-x
1111
color: white
12-
size: lg
12+
size: xs
1313
to: https://x.com/nuxt_hub
1414
target: _blank
15+
- label: 'NuxtHub'
16+
icon: i-simple-icons-linkedin
17+
color: white
18+
size: xs
19+
to: https://www.linkedin.com/showcase/nuxthub/
20+
target: _blank
1521
- label: 'Changelog RSS'
1622
icon: 'i-simple-icons-rss'
1723
to: '/changelog/rss.xml'
1824
color: white
19-
size: lg
25+
size: xs
2026
target: _blank

docs/content/4.changelog/blob-folders.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Blob Folders
33
description: "It is now possible to change the view of your blobs to a folder structure."
44
date: 2024-06-03
55
image: '/images/changelog/blob-folders.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/blob-upload-prefix.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Blob Upload Prefix
33
description: "It is now possible to upload a blob and setting the prefix beforehand."
44
date: 2024-07-02
55
image: '/images/changelog/blob-upload-prefix.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/deploy-button.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Deploy to NuxtHub button
33
description: "The Deploy to NuxtHub button allows you to deploy a GitHub template directly from the NuxtHub Admin."
44
date: 2024-07-22
55
image: '/images/changelog/deploy-button.png'
6-
category: Template
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/deployment-details.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Deployment Details
33
description: "We redesigned the deployment listing as well as added the deployment page to provide more information about each deployment."
44
date: 2024-05-28
55
image: '/images/changelog/deployment-details.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/drizzle-studio-remembers.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Drizzle Studio Remembers
33
description: "The database admin UI now remembers where you were last time, speeding up your workflow."
44
date: 2024-06-04
55
image: '/images/changelog/drizzle-studio-remembers.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/hello-edge.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Hello World Template
33
description: "Hello Edge is our minimal Nuxt template to get started with server-side rendering on the Edge."
44
date: 2024-06-18
55
image: '/images/changelog/hello-edge.png'
6-
category: Template
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/hub-ai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Introducing hubAI()
33
description: "Run machine learning models, such as LLMs in your Nuxt application, with minimal setup."
44
date: 2024-08-15
55
image: '/images/changelog/hub-ai.png'
6-
category: Admin
6+
category: Core
77
authors:
88
- name: Sebastien Chopin
99
avatar:

docs/content/4.changelog/hyperdrive-bindings.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Hyperdrive bindings
33
description: "It is now possible to use PostgreSQL & Cloudflare Hyperdrive in your Nuxt application."
44
date: 2024-08-28
55
image: '/images/changelog/hyperdrive-bindings.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/server-cache.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Server Cache UI
33
description: "It is now possible to manage your server cache with our new UI for Server Cache."
44
date: 2024-04-18
55
image: '/images/changelog/server-cache.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/team-webhooks-env.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Webhooks Environment Selection
33
description: "It is now possible to select the environment to be notified about."
44
date: 2024-06-15
55
image: '/images/changelog/team-webhooks-env.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/4.changelog/team-webhooks.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Team Webhooks
33
description: "It is now possible to trigger webhooks for your team's projects when a new deployment is created."
44
date: 2024-05-22
55
image: '/images/changelog/team-webhooks.png'
6-
category: Admin
76
authors:
87
- name: Sebastien Chopin
98
avatar:

docs/content/5.blog.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ hero:
1010
- label: '@nuxt_hub'
1111
icon: i-simple-icons-x
1212
color: white
13-
size: lg
13+
size: xs
1414
to: https://x.com/nuxt_hub
1515
target: _blank
16+
- label: 'NuxtHub'
17+
icon: i-simple-icons-linkedin
18+
color: white
19+
size: xs
20+
to: https://www.linkedin.com/showcase/nuxthub/
21+
target: _blank
1622
- label: 'Blog RSS'
1723
icon: 'i-simple-icons-rss'
1824
to: '/blog/rss.xml'
1925
color: white
20-
size: lg
26+
size: xs
2127
target: _blank

docs/pages/blog/[slug].vue

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,10 @@ const socialLinks = computed(() => [{
4444
icon: 'i-simple-icons-linkedin',
4545
to: `https://www.linkedin.com/sharing/share-offsite/?url=https://hub.nuxt.com${post.value._path}`
4646
}, {
47-
icon: 'i-simple-icons-twitter',
48-
to: `https://twitter.com/intent/tweet?text=${encodeURIComponent(`${post.value.title}\n\n`)}https://hub.nuxt.com${post.value._path}`
47+
icon: 'i-simple-icons-x',
48+
to: `https://x.com/intent/tweet?text=${encodeURIComponent(`${post.value.title}\n\n`)}https://hub.nuxt.com${post.value._path}`
4949
}])
5050
51-
const links = computed(() => [{
52-
icon: 'i-heroicons-pencil-square',
53-
label: 'Edit this post',
54-
to: `${toc.bottom.edit}/${post?.value?._file}`,
55-
target: '_blank'
56-
}, ...asideLinks].filter(Boolean))
57-
5851
function copyLink() {
5952
copy(`https://hub.nuxt.com${post.value._path}`, { title: 'Post URL to clipboard' })
6053
}
@@ -72,9 +65,7 @@ onMounted(() => {
7265
<template #headline>
7366
<UBreadcrumb :links="[{ label: 'Blog', icon: 'i-ph-newspaper-duotone', to: '/blog' }, { label: post.title }]" :ui="{ wrapper: 'max-w-full' }" />
7467
<div class="flex items-center space-x-2">
75-
<span>
76-
{{ post.badge?.label || 'Article' }}
77-
</span>
68+
<UBadge :label="post?.category || 'Article'" color="gray" />
7869
<span class="text-gray-500 dark:text-gray-400">&middot;&nbsp;&nbsp;<time>{{ formatDateByLocale('en', post.date) }}</time></span>
7970
</div>
8071
</template>
@@ -100,17 +91,16 @@ onMounted(() => {
10091
</UPageHeader>
10192

10293
<UPage>
103-
<UPageBody prose class="dark:text-gray-300 dark:prose-pre:!bg-gray-800/60">
94+
<UPageBody prose class="dark:text-gray-300 dark:prose-pre:!bg-gray-800/60 lg:pr-10">
10495
<ContentRenderer v-if="post && post.body" :value="post" />
105-
96+
<PageSectionCTA />
10697
<div class="flex items-center justify-between mt-12 not-prose">
107-
<UButton to="/blog" variant="link" :padded="false">
108-
Back to blog
98+
<UButton to="/blog" variant="link" :padded="false" color="gray" icon="i-ph-arrow-left">
99+
Back to blog
109100
</UButton>
110101
<div class="flex justify-end items-center gap-1.5">
111-
<UButton icon="i-ph-link-simple" v-bind="($ui.button.secondary as any)" @click="copyLink">
112-
Copy URL
113-
</UButton>
102+
Share:
103+
<UButton icon="i-ph-link-simple" color="gray" variant="ghost" @click="copyLink" />
114104
<UButton
115105
v-for="(link, index) in socialLinks"
116106
:key="index"
@@ -128,13 +118,7 @@ onMounted(() => {
128118
</UPageBody>
129119

130120
<template #right>
131-
<UContentToc v-if="post.body && post.body.toc" :links="post.body.toc.links">
132-
<template #bottom>
133-
<div class="hidden lg:block space-y-6">
134-
<UPageLinks title="Links" :links="links" />
135-
</div>
136-
</template>
137-
</UContentToc>
121+
<UContentToc v-if="post.body && post.body.toc" :links="post.body.toc.links" title="On this page" />
138122
</template>
139123
</UPage>
140124
</UPage>

0 commit comments

Comments
 (0)
0