mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
docs: update example links (#21811)
This commit is contained in:
parent
dc329c32aa
commit
d4af237685
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -4,11 +4,13 @@ on:
|
|||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
|
- "*.md"
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
|
- "*.md"
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- "!v[0-9]*"
|
- "!v[0-9]*"
|
||||||
|
1
.github/workflows/docs.yml
vendored
1
.github/workflows/docs.yml
vendored
@ -5,6 +5,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
- ".github/workflows/docs.yml"
|
- ".github/workflows/docs.yml"
|
||||||
|
- "*.md"
|
||||||
# autofix workflow will be triggered instead for PRs
|
# autofix workflow will be triggered instead for PRs
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
@ -55,7 +55,7 @@ Nuxt's goal is to make web development intuitive and performant, with a great de
|
|||||||
<td>
|
<td>
|
||||||
<h3>Examples</h3>
|
<h3>Examples</h3>
|
||||||
<p>
|
<p>
|
||||||
Explore different ways of using Nuxt features and get inspired with <a href="https://nuxt.com/docs/examples/essentials/hello-world">our list of examples</a>.
|
Explore different ways of using Nuxt features and get inspired with <a href="https://nuxt.com/docs/examples/hello-world">our list of examples</a>.
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -32,7 +32,7 @@ buttons:
|
|||||||
- label: 'Explore Examples'
|
- label: 'Explore Examples'
|
||||||
size: 'sm'
|
size: 'sm'
|
||||||
variant: 'secondary'
|
variant: 'secondary'
|
||||||
to: '/docs/examples/essentials/hello-world'
|
to: '/docs/examples/hello-world'
|
||||||
---
|
---
|
||||||
#title
|
#title
|
||||||
Getting Started
|
Getting Started
|
||||||
|
@ -246,7 +246,7 @@ useHead({
|
|||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
:LinkExample{link="/docs/examples/composables/use-head"}
|
:LinkExample{link="/docs/examples/features/meta-tags"}
|
||||||
|
|
||||||
:ReadMore{link="/docs/guide/directory-structure/pages/#page-metadata"}
|
:ReadMore{link="/docs/guide/directory-structure/pages/#page-metadata"}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ const { data: count } = await useFetch('/api/count')
|
|||||||
::ReadMore{link="/docs/api/composables/use-fetch"}
|
::ReadMore{link="/docs/api/composables/use-fetch"}
|
||||||
::
|
::
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/composables/use-fetch"}
|
::LinkExample{link="/docs/examples/features/data-fetching"}
|
||||||
::
|
::
|
||||||
|
|
||||||
## `$fetch`
|
## `$fetch`
|
||||||
|
@ -53,7 +53,7 @@ const counter = useState('counter', () => Math.round(Math.random() * 1000))
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/composables/use-state"}
|
::LinkExample{link="/docs/examples/features/state-management"}
|
||||||
::
|
::
|
||||||
|
|
||||||
::ReadMore{link="/docs/api/composables/use-state"}
|
::ReadMore{link="/docs/api/composables/use-state"}
|
||||||
@ -128,7 +128,7 @@ const date = useLocaleDate(new Date('2016-10-26'))
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/other/locale"}
|
::LinkExample{link="/docs/examples/advanced/locale"}
|
||||||
::
|
::
|
||||||
|
|
||||||
## Shared State
|
## Shared State
|
||||||
|
@ -170,5 +170,5 @@ If you navigate to another route, the error will be cleared automatically.
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/app/error-handling"}
|
::LinkExample{link="/docs/examples/advanced/error-handling"}
|
||||||
::
|
::
|
||||||
|
@ -425,4 +425,4 @@ export default defineNuxtConfig({
|
|||||||
|
|
||||||
It will automatically import the components only if used and also support HMR when updating your components in `node_modules/awesome-ui/components/`.
|
It will automatically import the components only if used and also support HMR when updating your components in `node_modules/awesome-ui/components/`.
|
||||||
|
|
||||||
:LinkExample{link="/docs/examples/auto-imports/components"}
|
:LinkExample{link="/docs/examples/features/auto-imports"}
|
||||||
|
@ -46,7 +46,7 @@ const foo = useFoo()
|
|||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/auto-imports/composables"}
|
::LinkExample{link="/docs/examples/features/auto-imports"}
|
||||||
::
|
::
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
@ -131,7 +131,7 @@ definePageMeta({
|
|||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/routing/layouts"}
|
::LinkExample{link="/docs/examples/features/layouts"}
|
||||||
::
|
::
|
||||||
|
|
||||||
## Overriding a Layout on a Per-page Basis
|
## Overriding a Layout on a Per-page Basis
|
||||||
|
@ -224,6 +224,3 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||||||
```
|
```
|
||||||
|
|
||||||
:ReadMore{link="https://vuejs.org/guide/reusability/custom-directives.html"}
|
:ReadMore{link="https://vuejs.org/guide/reusability/custom-directives.html"}
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/app/plugins"}
|
|
||||||
::
|
|
||||||
|
@ -216,5 +216,5 @@ export default defineEventHandler(event => {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/composables/use-cookie"}
|
::LinkExample{link="/docs/examples/advanced/use-cookie"}
|
||||||
::
|
::
|
||||||
|
@ -133,10 +133,10 @@ const { data, pending, error, refresh } = await useFetch('/api/auth/login', {
|
|||||||
`useFetch` is a reserved function name transformed by the compiler, so you should not name your own function `useFetch`.
|
`useFetch` is a reserved function name transformed by the compiler, so you should not name your own function `useFetch`.
|
||||||
::
|
::
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/other/use-custom-fetch-composable"}
|
::LinkExample{link="/docs/examples/advanced/use-custom-fetch-composable"}
|
||||||
::
|
::
|
||||||
|
|
||||||
:ReadMore{link="/docs/getting-started/data-fetching"}
|
:ReadMore{link="/docs/getting-started/data-fetching"}
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/composables/use-fetch"}
|
::LinkExample{link="/docs/examples/features/data-fetching"}
|
||||||
::
|
::
|
||||||
|
@ -126,5 +126,5 @@ defineNuxtLink({
|
|||||||
- **prefetchedClass**: A default class to apply to links that have been prefetched.
|
- **prefetchedClass**: A default class to apply to links that have been prefetched.
|
||||||
- **trailingSlash**: An option to either add or remove trailing slashes in the `href`. If unset or not matching the valid values `append` or `remove`, it will be ignored.
|
- **trailingSlash**: An option to either add or remove trailing slashes in the `href`. If unset or not matching the valid values `append` or `remove`, it will be ignored.
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/routing/nuxt-link"}
|
::LinkExample{link="/docs/examples/routing/pages"}
|
||||||
::
|
::
|
||||||
|
@ -37,5 +37,5 @@ The `to` target of [`<Teleport>`](https://vuejs.org/guide/built-ins/teleport.htm
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
::LinkExample{link="/docs/examples/app/teleport"}
|
::LinkExample{link="/docs/examples/advanced/teleport"}
|
||||||
::
|
::
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
"dev": "pnpm play",
|
"dev": "pnpm play",
|
||||||
"lint": "eslint --ext .vue,.ts,.js,.mjs .",
|
"lint": "eslint --ext .vue,.ts,.js,.mjs .",
|
||||||
"lint:fix": "eslint --ext .vue,.ts,.js,.mjs . --fix",
|
"lint:fix": "eslint --ext .vue,.ts,.js,.mjs . --fix",
|
||||||
"lint:docs": "markdownlint ./docs && case-police 'docs/**/*.md'",
|
"lint:docs": "markdownlint ./docs && case-police 'docs/**/*.md' *.md",
|
||||||
"lint:docs:fix": "markdownlint ./docs --fix && case-police 'docs/**/*.md' --fix",
|
"lint:docs:fix": "markdownlint ./docs --fix && case-police 'docs/**/*.md' *.md --fix",
|
||||||
"lint:knip": "pnpx knip",
|
"lint:knip": "pnpx knip",
|
||||||
"play": "nuxi dev playground",
|
"play": "nuxi dev playground",
|
||||||
"play:build": "nuxi build playground",
|
"play:build": "nuxi build playground",
|
||||||
|
Loading…
Reference in New Issue
Block a user