docs: update nitro links + fix link checking (#30228)

This commit is contained in:
Daniel Roe 2024-12-11 13:58:56 +00:00 committed by GitHub
parent dd91ac884b
commit c72cc1ba96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 41 additions and 32 deletions

View File

@ -1,5 +0,0 @@
# https://github.com/antfu/issue-up
upstream:
nitro: unjs/nitro
unimport: unjs/unimport
untyped: unjs/untyped

View File

@ -33,14 +33,14 @@ jobs:
with:
# arguments with file types to check
args: >-
--cache
--verbose
--no-progress
--max-cache-age=1d
'./**/*.md'
'./**/*.html'
'-c=lychee.toml'
'./docs/**/*.md'
'./docs/**/*.html'
'./packages/*/src/**/*.ts'
'./packages/*/src/**/*.js'
'./packages/*/src/**/*.md'
# fail the action on broken links
fail: true
env:
# to be used in case rate limits are surpassed
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -75,7 +75,7 @@ Nuxt is composed of different [core packages](https://github.com/nuxt/nuxt/tree/
- Core Engine: [nuxt](https://github.com/nuxt/nuxt/tree/main/packages/nuxt)
- Bundlers: [@nuxt/vite-builder](https://github.com/nuxt/nuxt/tree/main/packages/vite) and [@nuxt/webpack-builder](https://github.com/nuxt/nuxt/tree/main/packages/webpack)
- Command line interface: [nuxi](https://github.com/nuxt/nuxt/tree/main/packages/nuxi)
- Server engine: [nitro](https://github.com/unjs/nitro)
- Server engine: [nitro](https://github.com/nitrojs/nitro)
- Development kit: [@nuxt/kit](https://github.com/nuxt/nuxt/tree/main/packages/kit)
We recommend reading each concept to have a full vision of Nuxt capabilities and the scope of each package.

View File

@ -42,7 +42,7 @@ You can opt in to the 3.x branch nightly releases with `"nuxt": "npm:nuxt-nightl
## Testing Nuxt 4
The release date of Nuxt 4 is **to be announced**. It is dependent on having enough time after Nitro's major release to be properly tested in the community. You can follow progress towards Nitro's release in [this PR](https://github.com/unjs/nitro/pull/2521).
The release date of Nuxt 4 is **to be announced**. It is dependent on having enough time after Nitro's major release to be properly tested in the community. You can follow progress towards Nitro's release in [this PR](https://github.com/nitrojs/nitro/pull/2521).
Until the release, it is possible to test many of Nuxt 4's breaking changes from Nuxt version 3.12+.

View File

@ -10,7 +10,7 @@ navigation.icon: i-ph-computer-tower
![Server engine](/assets/docs/getting-started/server.svg)
Nuxt's server is [Nitro](https://github.com/unjs/nitro). It was originally created for Nuxt but is now part of [UnJS](https://unjs.io) and open for other frameworks - and can even be used on its own.
Nuxt's server is [Nitro](https://github.com/nitrojs/nitro). It was originally created for Nuxt but is now part of [UnJS](https://unjs.io) and open for other frameworks - and can even be used on its own.
Using Nitro gives Nuxt superpowers:

View File

@ -57,6 +57,6 @@ Nuxt generates this dist when running `nuxt build` into a [`.output`](/docs/guid
The output contains runtime code to run your Nuxt server in any environment (including experimental browser service workers!) and serve your static files, making it a true hybrid framework for the JAMstack. In addition, Nuxt implements a native storage layer, supporting multi-source drivers and local assets.
::read-more{color="gray" icon="i-simple-icons-github" to="https://github.com/unjs/nitro" target="_blank"}
::read-more{color="gray" icon="i-simple-icons-github" to="https://github.com/nitrojs/nitro" target="_blank"}
Read more about Nitro engine on GitHub.
::

View File

@ -173,5 +173,5 @@ Related issues:
::info
Nitro v3 will resolve these limitations by removing support for the app config.
You can track the progress in [this pull request](https://github.com/unjs/nitro/pull/2521).
You can track the progress in [this pull request](https://github.com/nitrojs/nitro/pull/2521).
::

View File

@ -99,7 +99,7 @@ Hook | Arguments | Description
`render:html` | `html, { event }` | Called before constructing the HTML. | [html](https://github.com/nuxt/nuxt/blob/71ef8bd3ff207fd51c2ca18d5a8c7140476780c7/packages/nuxt/src/core/runtime/nitro/renderer.ts#L15), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38)
`render:island` | `islandResponse, { event, islandContext }` | Called before constructing the island HTML. | [islandResponse](https://github.com/nuxt/nuxt/blob/e50cabfed1984c341af0d0c056a325a8aec26980/packages/nuxt/src/core/runtime/nitro/renderer.ts#L28), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38), [islandContext](https://github.com/nuxt/nuxt/blob/e50cabfed1984c341af0d0c056a325a8aec26980/packages/nuxt/src/core/runtime/nitro/renderer.ts#L38)
`close` | - | Called when Nitro is closed. | -
`error` | `error, { event? }` | Called when an error occurs. | [error](https://github.com/unjs/nitro/blob/d20ffcbd16fc4003b774445e1a01e698c2bb078a/src/types/runtime/nitro.ts#L48), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38)
`error` | `error, { event? }` | Called when an error occurs. | [error](https://github.com/nitrojs/nitro/blob/d20ffcbd16fc4003b774445e1a01e698c2bb078a/src/types/runtime/nitro.ts#L48), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38)
`request` | `event` | Called when a request is received. | [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38)
`beforeResponse` | `event, { body }` | Called before sending the response. | [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38), unknown
`afterResponse` | `event, { body }` | Called after sending the response. | [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38), unknown

View File

@ -137,7 +137,7 @@ Under projects with configuration as shown below, Corepack will install `v7.5.0`
#### Use ESLint
We use [ESLint](https://eslint.org) for both linting and formatting with [`@nuxt/eslint-config`](https://github.com/nuxt/eslint-config).
We use [ESLint](https://eslint.org) for both linting and formatting with [`@nuxt/eslint`](https://github.com/nuxt/eslint).
##### IDE Setup
@ -158,11 +158,9 @@ Since ESLint is already configured to format the code, there is no need to dupli
If you have Prettier installed in your editor, we recommend you disable it when working on the project to avoid conflict.
**Note**: [we are discussing](https://github.com/nuxt/eslint-config/issues/224) enabling Prettier in future.
#### Package Manager
For libraries, we recommend `pnpm`. For modules, we still recommend `yarn` but we may well switch this recommendation to `pnpm` in future once we support plug and play mode with Nuxt itself.
We recommend `pnpm` as a package manager for modules, libraries and apps.
It is important to enable Corepack to ensure you are on the same version of the package manager as the project. Corepack is built-in to new node versions for seamless package manager integration.

View File

@ -1,9 +1,18 @@
# Cache the results of Lychee if ran locally in order to minimise the chance of rate limiting
cache = true
# Discard all cached requests older than this duration.
max_cache_age = "1d"
# Ignore all private link (such as localhost) to avoid errors
exclude_all_private = true
# HTTP status code: 429 (Too Many Requests) will also be treated as a valid link if Lychee gets rate limited
accept = [200, 429]
# Base URL or website root directory to check relative URLs.
base = "https://nuxt.com"
no_progress = true
# retry
max_retries = 6
# Explicitly exclude some URLs
@ -11,10 +20,17 @@ exclude = [
"https://twitter.nuxt.dev/",
"https://github.com/nuxt/translations/discussions/4",
"https://stackoverflow.com/help/minimal-reproducible-example",
# TODO: remove when their SSL certificate is valid again
"https://www.conventionalcommits.org",
"https://gsap.com/",
# dummy example URLs
"https://myawesome-lib.js/",
"https://awesome-lib.js/",
"https://myawesome-lib.css/",
"https://awesome-lib.css/",
'https://www.npmjs.com/package/(.*)importName(.*)',
# TODO: address 404s (non-prerendered files?) from nuxt.com
"https://nuxt.com/docs/guide/going-further/modules",
"https://nuxt.com/docs/guide/directory-structure/pages",
# single-quotes are required for regexp
'(https?:\/\/github\.com\/)(.*\/)(generate)',
"https://localhost:3000",
'(https?:\/\/github\.com\/)(.*\/)(generate)',
"https://github.com/nuxt-contrib/vue3-ssr-starter/generate",
]

View File

@ -36,9 +36,9 @@ export function updateRuntimeConfig (runtimeConfig: Record<string, unknown>) {
}
/**
* https://github.com/unjs/nitro/blob/main/src/runtime/utils.env.ts.
* https://github.com/nitrojs/nitro/blob/main/src/runtime/internal/utils.env.ts.
*
* These utils will be replaced by util exposed from nitropack. See https://github.com/unjs/nitro/pull/2404
* These utils will be replaced by util exposed from nitropack. See https://github.com/nitrojs/nitro/pull/2404
* for more context and future plans.)
*
* @internal

View File

@ -86,7 +86,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
from: resolve(distDir, 'core/runtime/nitro/paths'),
},
{
// TODO: Remove after https://github.com/unjs/nitro/issues/1049
// TODO: Remove after https://github.com/nitrojs/nitro/issues/1049
as: 'defineAppConfig',
name: 'defineAppConfig',
from: resolve(distDir, 'core/runtime/nitro/config'),

View File

@ -86,7 +86,7 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
}
/**
* Nitro internal functions extracted from https://github.com/unjs/nitro/blob/main/src/runtime/internal/utils.ts
* Nitro internal functions extracted from https://github.com/nitrojs/nitro/blob/main/src/runtime/internal/utils.ts
*/
function isJsonRequest (event: H3Event) {
@ -112,7 +112,7 @@ function hasReqHeader (event: H3Event, name: string, includes: string) {
}
function normalizeError (error: any) {
// temp fix for https://github.com/unjs/nitro/issues/759
// temp fix for https://github.com/nitrojs/nitro/issues/759
// TODO: investigate vercel-edge not using unenv pollyfill
const cwd = typeof process.cwd === 'function' ? process.cwd() : '/'

View File

@ -99,7 +99,7 @@ export default defineUntypedSchema({
},
// TODO: Remove when nitro has support for mocking traced dependencies
// https://github.com/unjs/nitro/issues/1118
// https://github.com/nitrojs/nitro/issues/1118
/**
* Externalize `vue`, `@vue/*` and `vue-router` when building.
* @see [Nuxt Issue #13632](https://github.com/nuxt/nuxt/issues/13632)