docs: update example links (#21811)

This commit is contained in:
Daniel Roe 2023-06-27 12:27:11 +01:00 committed by GitHub
parent dc329c32aa
commit d4af237685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 20 additions and 20 deletions

View File

@ -4,11 +4,13 @@ on:
push:
paths-ignore:
- "docs/**"
- "*.md"
branches:
- main
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
branches:
- main
- "!v[0-9]*"

View File

@ -5,6 +5,7 @@ on:
paths:
- "docs/**"
- ".github/workflows/docs.yml"
- "*.md"
# autofix workflow will be triggered instead for PRs
branches:
- main

View File

@ -55,7 +55,7 @@ Nuxt's goal is to make web development intuitive and performant, with a great de
<td>
<h3>Examples</h3>
<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>
</td>
</tr>

View File

@ -32,7 +32,7 @@ buttons:
- label: 'Explore Examples'
size: 'sm'
variant: 'secondary'
to: '/docs/examples/essentials/hello-world'
to: '/docs/examples/hello-world'
---
#title
Getting Started

View File

@ -246,7 +246,7 @@ useHead({
</script>
```
:LinkExample{link="/docs/examples/composables/use-head"}
:LinkExample{link="/docs/examples/features/meta-tags"}
:ReadMore{link="/docs/guide/directory-structure/pages/#page-metadata"}

View File

@ -58,7 +58,7 @@ const { data: count } = await useFetch('/api/count')
::ReadMore{link="/docs/api/composables/use-fetch"}
::
::LinkExample{link="/docs/examples/composables/use-fetch"}
::LinkExample{link="/docs/examples/features/data-fetching"}
::
## `$fetch`

View File

@ -53,7 +53,7 @@ const counter = useState('counter', () => Math.round(Math.random() * 1000))
</template>
```
::LinkExample{link="/docs/examples/composables/use-state"}
::LinkExample{link="/docs/examples/features/state-management"}
::
::ReadMore{link="/docs/api/composables/use-state"}
@ -128,7 +128,7 @@ const date = useLocaleDate(new Date('2016-10-26'))
</template>
```
::LinkExample{link="/docs/examples/other/locale"}
::LinkExample{link="/docs/examples/advanced/locale"}
::
## Shared State

View File

@ -170,5 +170,5 @@ If you navigate to another route, the error will be cleared automatically.
</template>
```
::LinkExample{link="/docs/examples/app/error-handling"}
::LinkExample{link="/docs/examples/advanced/error-handling"}
::

View File

@ -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/`.
:LinkExample{link="/docs/examples/auto-imports/components"}
:LinkExample{link="/docs/examples/features/auto-imports"}

View File

@ -46,7 +46,7 @@ const foo = useFoo()
</script>
```
::LinkExample{link="/docs/examples/auto-imports/composables"}
::LinkExample{link="/docs/examples/features/auto-imports"}
::
## Examples

View File

@ -131,7 +131,7 @@ definePageMeta({
</script>
```
::LinkExample{link="/docs/examples/routing/layouts"}
::LinkExample{link="/docs/examples/features/layouts"}
::
## Overriding a Layout on a Per-page Basis

View File

@ -224,6 +224,3 @@ export default defineNuxtPlugin((nuxtApp) => {
```
:ReadMore{link="https://vuejs.org/guide/reusability/custom-directives.html"}
::LinkExample{link="/docs/examples/app/plugins"}
::

View File

@ -216,5 +216,5 @@ export default defineEventHandler(event => {
})
```
::LinkExample{link="/docs/examples/composables/use-cookie"}
::LinkExample{link="/docs/examples/advanced/use-cookie"}
::

View File

@ -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`.
::
::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"}
::LinkExample{link="/docs/examples/composables/use-fetch"}
::LinkExample{link="/docs/examples/features/data-fetching"}
::

View File

@ -126,5 +126,5 @@ defineNuxtLink({
- **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.
::LinkExample{link="/docs/examples/routing/nuxt-link"}
::LinkExample{link="/docs/examples/routing/pages"}
::

View File

@ -37,5 +37,5 @@ The `to` target of [`<Teleport>`](https://vuejs.org/guide/built-ins/teleport.htm
</template>
```
::LinkExample{link="/docs/examples/app/teleport"}
::LinkExample{link="/docs/examples/advanced/teleport"}
::

View File

@ -11,8 +11,8 @@
"dev": "pnpm play",
"lint": "eslint --ext .vue,.ts,.js,.mjs .",
"lint:fix": "eslint --ext .vue,.ts,.js,.mjs . --fix",
"lint:docs": "markdownlint ./docs && case-police 'docs/**/*.md'",
"lint:docs:fix": "markdownlint ./docs --fix && case-police 'docs/**/*.md' --fix",
"lint:docs": "markdownlint ./docs && case-police 'docs/**/*.md' *.md",
"lint:docs:fix": "markdownlint ./docs --fix && case-police 'docs/**/*.md' *.md --fix",
"lint:knip": "pnpx knip",
"play": "nuxi dev playground",
"play:build": "nuxi build playground",