Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit 1582f8e

Browse files
committed
docs: improve examples content
1 parent 8e4068b commit 1582f8e

25 files changed

+81
-52
lines changed

docs/content/4.examples/0.essentials/hello-world.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: "Hello World"
3-
description: "A minimal Nuxt 3 application only requires the `app.vue` and `nuxt.config.js` files."
42
toc: false
53
---
64

5+
# Hello World
6+
77
A minimal Nuxt 3 application only requires the `app.vue` and `nuxt.config.js` files.
88

99
::ReadMore{link="/getting-started/introduction"}

docs/content/4.examples/1.app/app-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
template: Example
2+
toc: false
33
---
44

55
# `app.config`

docs/content/4.examples/1.app/error-handling.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
2-
title: "Error Handling"
3-
description: "This example shows how to handle errors in different contexts: pages, plugins, components and middleware."
42
toc: false
53
---
64

75
# Error Handling
86

97
This example shows how to handle errors in different contexts: pages, plugins, components and middleware.
108

11-
::ReadMore{link="/getting-started/error-handling"}
9+
:ReadMore{link="/getting-started/error-handling"}
1210
::
1311

1412
::sandbox{repo="nuxt/framework" branch="main" dir="examples/app/error-handling" file="app.vue"}

docs/content/4.examples/1.app/plugins.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
title: "Plugins"
3-
description: "This example shows how to use the plugins/ directory to auto-register plugins."
42
toc: false
53
---
64

7-
::ReadMore{link="/guide/directory-structure/plugins"}
5+
# Plugins
6+
7+
This example shows how to use the plugins/ directory to auto-register plugins.
8+
9+
:ReadMore{link="/guide/directory-structure/plugins"}
810
::
911

1012
::sandbox{repo="nuxt/framework" branch="main" dir="examples/app/plugins" file="app.vue"}

docs/content/4.examples/1.app/teleport.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
title: "Teleport"
3-
description: "This example shows how to use the <Teleport> with client-side and server-side rendering."
42
toc: false
53
---
64

5+
# Teleport
6+
7+
This example shows how to use the <Teleport> with client-side and server-side rendering.
8+
79
Vue 3 provides the [`<Teleport>` component](https://vuejs.org/guide/built-ins/teleport.html) which allows content to be rendered elsewhere in the DOM, outside of the Vue application.
810

911
This example shows how to use the `<Teleport>` with client-side and server-side rendering.

docs/content/4.examples/2.auto-imports/components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Components"
3-
description: "You can configure other directories to support components auto-imports."
42
toc: false
53
---
64

7-
Components in the `components/` directory are auto-imported and can be used directly in your templates.
5+
# Components
6+
7+
Components in the `components/` directory are auto-imported and can be used directly in your templates. You can configure other directories to support components auto-imports.
88

99
::ReadMore{link="/guide/directory-structure/components"}
1010
::

docs/content/4.examples/2.auto-imports/composables.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
title: "Composables"
3-
description: "This example shows how to use the composables/ directory to auto-import composables."
42
toc: false
53
---
64

7-
If the component file provides a default export, the name of the composable will be mapped to the name of the file. Named exports can be used as-is.
5+
# Composables
6+
7+
This example shows how to use the composables/ directory to auto-import composables.
8+
9+
If the composable file provides a default export, the name of the composable will be mapped to the name of the file. Named exports can be used as-is.
810

911
::ReadMore{link="/guide/directory-structure/composables"}
1012
::

docs/content/4.examples/3.composables/use-async-data.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
title: "useAsyncData"
3-
description: "This example shows how to use useAsyncData to fetch data from an API endpoint."
42
toc: false
53
---
64

5+
# useAsyncData
6+
7+
This example shows how to use useAsyncData to fetch data from an API endpoint.
8+
79
::alert{type=info icon=💡}
810
Nuxt will automatically read files in the `~/server/api` directory to create API endpoints.
911
::

docs/content/4.examples/3.composables/use-cookie.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
title: "useCookie"
3-
description: "This example shows how to use the useCookie API to persist small amounts of data that both client and server can use."
42
toc: false
53
---
64

5+
# useCookie
6+
7+
This example shows how to use the useCookie API to persist small amounts of data that both client and server can use.
8+
79
::ReadMore{link="/api/composables/use-cookie"}
810
::
911

docs/content/4.examples/3.composables/use-fetch.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
title: "useFetch"
3-
description: "This example shows how to use useFetch to fetch data from an API endpoint."
42
toc: false
53
---
64

5+
# useFetch
6+
7+
This example shows how to use useFetch to fetch data from an API endpoint.
8+
79
::alert{type=info icon=💡}
810
Nuxt will automatically read files in the `~/server/api` directory to create API endpoints.
911
::

0 commit comments

Comments
 (0)