diff --git a/.changeset/strange-plums-drop.md b/.changeset/strange-plums-drop.md new file mode 100644 index 000000000000..dc8d4d160a14 --- /dev/null +++ b/.changeset/strange-plums-drop.md @@ -0,0 +1,16 @@ +--- +'@sveltejs/adapter-cloudflare-workers': patch +'@sveltejs/adapter-cloudflare': patch +'@sveltejs/adapter-netlify': patch +'@sveltejs/adapter-static': patch +'@sveltejs/adapter-vercel': patch +'@sveltejs/adapter-auto': patch +'@sveltejs/adapter-node': patch +'@sveltejs/enhanced-img': patch +'svelte-migrate': patch +'@sveltejs/package': patch +'@sveltejs/amp': patch +'@sveltejs/kit': patch +--- + +docs: update URLs for new svelte.dev site diff --git a/packages/adapter-auto/README.md b/packages/adapter-auto/README.md index 26f861ded979..ed96335346a5 100644 --- a/packages/adapter-auto/README.md +++ b/packages/adapter-auto/README.md @@ -4,7 +4,7 @@ Automatically chooses the SvelteKit adapter for your current environment, if pos ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-auto) +[Docs](https://svelte.dev/docs/kit/adapter-auto) ## Changelog diff --git a/packages/adapter-auto/index.js b/packages/adapter-auto/index.js index cc1c676ffb80..c83ba6246c59 100644 --- a/packages/adapter-auto/index.js +++ b/packages/adapter-auto/index.js @@ -117,7 +117,7 @@ export default () => ({ if (adapter) return adapter.adapt(builder); builder.log.warn( - 'Could not detect a supported production environment. See https://kit.svelte.dev/docs/adapters to learn how to configure your app to run on the platform of your choosing' + 'Could not detect a supported production environment. See https://svelte.dev/docs/kit/adapters to learn how to configure your app to run on the platform of your choosing' ); }, supports: { diff --git a/packages/adapter-auto/package.json b/packages/adapter-auto/package.json index d9bf9d9a91c1..b80c17e10e22 100644 --- a/packages/adapter-auto/package.json +++ b/packages/adapter-auto/package.json @@ -17,7 +17,7 @@ "directory": "packages/adapter-auto" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/adapter-cloudflare-workers/README.md b/packages/adapter-cloudflare-workers/README.md index 1dbb3a50f2cb..a3805020a4aa 100644 --- a/packages/adapter-cloudflare-workers/README.md +++ b/packages/adapter-cloudflare-workers/README.md @@ -6,7 +6,7 @@ SvelteKit adapter that creates a Cloudflare Workers site using a function for dy ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-cloudflare-workers) +[Docs](https://svelte.dev/docs/kit/adapter-cloudflare-workers) ## Changelog diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json index ff8b55ec7acf..d6801a02569b 100644 --- a/packages/adapter-cloudflare-workers/package.json +++ b/packages/adapter-cloudflare-workers/package.json @@ -16,7 +16,7 @@ "directory": "packages/adapter-cloudflare-workers" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/adapter-cloudflare/README.md b/packages/adapter-cloudflare/README.md index 51a7eb0302fe..fa00adbf1c94 100644 --- a/packages/adapter-cloudflare/README.md +++ b/packages/adapter-cloudflare/README.md @@ -1,10 +1,10 @@ # adapter-cloudflare -[Adapter](https://kit.svelte.dev/docs/building-your-app) for building SvelteKit applications on [Cloudflare Pages](https://developers.cloudflare.com/pages/) with [Workers integration](https://developers.cloudflare.com/pages/platform/functions). +[Adapter](https://svelte.dev/docs/kit/building-your-app) for building SvelteKit applications on [Cloudflare Pages](https://developers.cloudflare.com/pages/) with [Workers integration](https://developers.cloudflare.com/pages/platform/functions). ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-cloudflare) +[Docs](https://svelte.dev/docs/kit/adapter-cloudflare) ## Changelog diff --git a/packages/adapter-cloudflare/package.json b/packages/adapter-cloudflare/package.json index a7eaf5448a9b..9d294a4ed177 100644 --- a/packages/adapter-cloudflare/package.json +++ b/packages/adapter-cloudflare/package.json @@ -16,7 +16,7 @@ "directory": "packages/adapter-cloudflare" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/adapter-netlify/README.md b/packages/adapter-netlify/README.md index 93ea58a9f964..339311ffb2df 100644 --- a/packages/adapter-netlify/README.md +++ b/packages/adapter-netlify/README.md @@ -4,7 +4,7 @@ A SvelteKit adapter that creates a Netlify app. ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-netlify) +[Docs](https://svelte.dev/docs/kit/adapter-netlify) ## Changelog diff --git a/packages/adapter-netlify/index.js b/packages/adapter-netlify/index.js index 2b7fafd47711..8fc380cc270f 100644 --- a/packages/adapter-netlify/index.js +++ b/packages/adapter-netlify/index.js @@ -323,7 +323,7 @@ function get_publish_directory(netlify_config, builder) { } builder.log.warn( - 'No netlify.toml found. Using default publish directory. Consult https://kit.svelte.dev/docs/adapter-netlify#usage for more details' + 'No netlify.toml found. Using default publish directory. Consult https://svelte.dev/docs/kit/adapter-netlify#usage for more details' ); } diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json index bae99da20417..9c7631d878a8 100644 --- a/packages/adapter-netlify/package.json +++ b/packages/adapter-netlify/package.json @@ -16,7 +16,7 @@ "directory": "packages/adapter-netlify" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/adapter-node/README.md b/packages/adapter-node/README.md index 978aa477319e..22e355fee5ed 100644 --- a/packages/adapter-node/README.md +++ b/packages/adapter-node/README.md @@ -1,10 +1,10 @@ # @sveltejs/adapter-node -[Adapter](https://kit.svelte.dev/docs/adapters) for SvelteKit apps that generates a standalone Node server. +[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that generates a standalone Node server. ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-node) +[Docs](https://svelte.dev/docs/kit/adapter-node) ## Changelog diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json index 9ba8d2a63e07..3da7dc6ff361 100644 --- a/packages/adapter-node/package.json +++ b/packages/adapter-node/package.json @@ -16,7 +16,7 @@ "directory": "packages/adapter-node" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/adapter-static/README.md b/packages/adapter-static/README.md index 0d3aebd93adf..b612f2aa6122 100644 --- a/packages/adapter-static/README.md +++ b/packages/adapter-static/README.md @@ -1,10 +1,10 @@ # @sveltejs/adapter-static -[Adapter](https://kit.svelte.dev/docs/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://kit.svelte.dev/docs/page-options#prerender). +[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://svelte.dev/docs/kit/page-options#prerender). ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-static) +[Docs](https://svelte.dev/docs/kit/adapter-static) ## Changelog diff --git a/packages/adapter-static/index.js b/packages/adapter-static/index.js index 3ddb1b84ea4a..c5e0d68efa42 100644 --- a/packages/adapter-static/index.js +++ b/packages/adapter-static/index.js @@ -18,7 +18,7 @@ export default function (options) { has_param_routes ? '(routes with parameters are not part of entry points by default)' : '' - } — see https://kit.svelte.dev/docs/configuration#prerender for more info.` + } — see https://svelte.dev/docs/kit/configuration#prerender for more info.` : ''; builder.log.error( @@ -26,14 +26,14 @@ export default function (options) { ${dynamic_routes.map((route) => ` - ${path.posix.join(prefix, route.id)}`).join('\n')} You have the following options: - - set the \`fallback\` option — see https://kit.svelte.dev/docs/single-page-apps#usage for more info. + - set the \`fallback\` option — see https://svelte.dev/docs/kit/single-page-apps#usage for more info. - add \`export const prerender = true\` to your root \`+layout.js/.ts\` or \`+layout.server.js/.ts\` file. This will try to prerender all pages. - add \`export const prerender = true\` to any \`+server.js/ts\` files that are not fetched by page \`load\` functions. ${config_option} - pass \`strict: false\` to \`adapter-static\` to ignore this error. Only do this if you are sure you don't need the routes in question in your final app, as they will be unavailable. See https://github.com/sveltejs/kit/tree/main/packages/adapter-static#strict for more info. If this doesn't help, you may need to use a different adapter. @sveltejs/adapter-static can only be used for sites that don't need a server for dynamic rendering, and can run on just a static file server. -See https://kit.svelte.dev/docs/page-options#prerender for more details` +See https://svelte.dev/docs/kit/page-options#prerender for more details` ); throw new Error('Encountered dynamic routes'); } diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json index 6aa221827c71..f28a87ccad5c 100644 --- a/packages/adapter-static/package.json +++ b/packages/adapter-static/package.json @@ -17,7 +17,7 @@ "directory": "packages/adapter-static" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/adapter-static/test/apps/spa/README.md b/packages/adapter-static/test/apps/spa/README.md index 1facfc2a692c..16c7d1981629 100644 --- a/packages/adapter-static/test/apps/spa/README.md +++ b/packages/adapter-static/test/apps/spa/README.md @@ -27,7 +27,7 @@ npm run dev -- --open ## Building -Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. Then: +Before creating a production version of your app, install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. Then: ```bash npm run build diff --git a/packages/adapter-vercel/README.md b/packages/adapter-vercel/README.md index a5c47db245b5..ce1a3c89595e 100644 --- a/packages/adapter-vercel/README.md +++ b/packages/adapter-vercel/README.md @@ -4,7 +4,7 @@ A SvelteKit adapter that creates a Vercel app. ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-vercel) +[Docs](https://svelte.dev/docs/kit/adapter-vercel) ## Changelog diff --git a/packages/adapter-vercel/package.json b/packages/adapter-vercel/package.json index 383cebe5e34a..85b9e203a01e 100644 --- a/packages/adapter-vercel/package.json +++ b/packages/adapter-vercel/package.json @@ -16,7 +16,7 @@ "directory": "packages/adapter-vercel" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/amp/package.json b/packages/amp/package.json index 45e8b389a32c..155251a05d1f 100644 --- a/packages/amp/package.json +++ b/packages/amp/package.json @@ -14,7 +14,7 @@ "directory": "packages/amp" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { diff --git a/packages/enhanced-img/README.md b/packages/enhanced-img/README.md index 93f194944ff7..ac87975c1f95 100644 --- a/packages/enhanced-img/README.md +++ b/packages/enhanced-img/README.md @@ -6,7 +6,7 @@ A Vite plugin which runs a Svelte preprocessor to locate images and then transfo ## Docs -[Docs](https://kit.svelte.dev/docs/images) +[Docs](https://svelte.dev/docs/kit/images) ## Changelog diff --git a/packages/enhanced-img/package.json b/packages/enhanced-img/package.json index 8cd893d36d2c..2225e4cd0741 100644 --- a/packages/enhanced-img/package.json +++ b/packages/enhanced-img/package.json @@ -18,7 +18,7 @@ "vite" ], "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "scripts": { "lint": "prettier --check .", diff --git a/packages/enhanced-img/types/index.d.ts b/packages/enhanced-img/types/index.d.ts index 458caafbb6d8..5d287fc672d6 100644 --- a/packages/enhanced-img/types/index.d.ts +++ b/packages/enhanced-img/types/index.d.ts @@ -5,7 +5,7 @@ import './ambient.js'; type EnhancedImgAttributes = Omit & { src: string | Picture }; -// https://svelte.dev/docs/typescript#enhancing-built-in-dom-types +// https://svelte.dev/docs/svelte/typescript#enhancing-built-in-dom-types declare module 'svelte/elements' { export interface SvelteHTMLElements { 'enhanced:img': EnhancedImgAttributes; diff --git a/packages/kit/CHANGELOG.md b/packages/kit/CHANGELOG.md index e85f799bb106..3e8cc810c68a 100644 --- a/packages/kit/CHANGELOG.md +++ b/packages/kit/CHANGELOG.md @@ -4206,8 +4206,8 @@ Starting from now all releases follow semver and changes will be listed as Major ### Patch Changes -- Allow endpoints to return a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), or an object with [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) ([docs](https://kit.svelte.dev/docs/routing#endpoints), [#3384](https://github.com/sveltejs/kit/pull/3384)) -- breaking: Expose standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object to endpoints and hooks. `method`, `headers`, and `body` now accessed through `request` field ([docs](https://kit.svelte.dev/docs/routing#endpoints), [#3384](https://github.com/sveltejs/kit/pull/3384)) +- Allow endpoints to return a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), or an object with [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) ([docs](https://svelte.dev/docs/kit/routing#endpoints), [#3384](https://github.com/sveltejs/kit/pull/3384)) +- breaking: Expose standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object to endpoints and hooks. `method`, `headers`, and `body` now accessed through `request` field ([docs](https://svelte.dev/docs/kit/routing#endpoints), [#3384](https://github.com/sveltejs/kit/pull/3384)) - breaking: change `app.render` signature to (request: Request) => Promise ([#3384](https://github.com/sveltejs/kit/pull/3384)) - breaking: move protocol/host configuration options from Kit to adapter-node ([#3384](https://github.com/sveltejs/kit/pull/3384)) @@ -4342,7 +4342,7 @@ Starting from now all releases follow semver and changes will be listed as Major ### Patch Changes -- breaking: Add `disableScrollHandling` function (see https://kit.svelte.dev/docs/modules#$app-navigation) ([#3182](https://github.com/sveltejs/kit/pull/3182)) +- breaking: Add `disableScrollHandling` function (see https://svelte.dev/docs/kit/modules#$app-navigation) ([#3182](https://github.com/sveltejs/kit/pull/3182)) ## 1.0.0-next.213 diff --git a/packages/kit/README.md b/packages/kit/README.md index f5b81142dcff..f5592f982a6d 100644 --- a/packages/kit/README.md +++ b/packages/kit/README.md @@ -1,8 +1,8 @@ # The fastest way to build Svelte apps -This is the [SvelteKit](https://kit.svelte.dev) framework and CLI. +This is the [SvelteKit](https://svelte.dev/docs/kit) framework and CLI. -The quickest way to get started is via the [create-svelte](https://github.com/sveltejs/kit/tree/main/packages/create-svelte) package: +The quickest way to get started is via the [sv](https://npmjs.com/package/sv) package: ```bash npx sv create my-app @@ -11,7 +11,7 @@ npm install npm run dev ``` -See the [documentation](https://kit.svelte.dev/docs) to learn more. +See the [documentation](https://svelte.dev/docs/kit) to learn more. ## Changelog diff --git a/packages/kit/package.json b/packages/kit/package.json index 61f5729d79ea..c77a8c1e4e17 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -15,7 +15,7 @@ "directory": "packages/kit" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "dependencies": { "@types/cookie": "^0.6.0", diff --git a/packages/kit/src/core/config/index.js b/packages/kit/src/core/config/index.js index 36b82a86db04..b387cb2f0a44 100644 --- a/packages/kit/src/core/config/index.js +++ b/packages/kit/src/core/config/index.js @@ -111,7 +111,7 @@ function process_config(config, { cwd = process.cwd() } = {}) { export function validate_config(config) { if (typeof config !== 'object') { throw new Error( - 'svelte.config.js must have a configuration object as its default export. See https://kit.svelte.dev/docs/configuration' + 'svelte.config.js must have a configuration object as its default export. See https://svelte.dev/docs/kit/configuration' ); } diff --git a/packages/kit/src/core/config/index.spec.js b/packages/kit/src/core/config/index.spec.js index 0f946a61292d..35ca362837d5 100644 --- a/packages/kit/src/core/config/index.spec.js +++ b/packages/kit/src/core/config/index.spec.js @@ -209,7 +209,7 @@ test('fails if kit.appDir is only slash', () => { appDir: '/' } }); - }, /^config\.kit\.appDir cannot start or end with '\/'. See https:\/\/kit\.svelte\.dev\/docs\/configuration$/); + }, /^config\.kit\.appDir cannot start or end with '\/'. See https:\/\/svelte\.dev\/docs\/kit\/configuration$/); }); test('fails if kit.appDir starts with slash', () => { @@ -219,7 +219,7 @@ test('fails if kit.appDir starts with slash', () => { appDir: '/_app' } }); - }, /^config\.kit\.appDir cannot start or end with '\/'. See https:\/\/kit\.svelte\.dev\/docs\/configuration$/); + }, /^config\.kit\.appDir cannot start or end with '\/'. See https:\/\/svelte\.dev\/docs\/kit\/configuration$/); }); test('fails if kit.appDir ends with slash', () => { @@ -229,7 +229,7 @@ test('fails if kit.appDir ends with slash', () => { appDir: '_app/' } }); - }, /^config\.kit\.appDir cannot start or end with '\/'. See https:\/\/kit\.svelte\.dev\/docs\/configuration$/); + }, /^config\.kit\.appDir cannot start or end with '\/'. See https:\/\/svelte\.dev\/docs\/kit\/configuration$/); }); test('fails if paths.base is not root-relative', () => { @@ -242,7 +242,7 @@ test('fails if paths.base is not root-relative', () => { } } }); - }, /^config\.kit\.paths\.base option must either be the empty string or a root-relative path that starts but doesn't end with '\/'. See https:\/\/kit\.svelte\.dev\/docs\/configuration#paths$/); + }, /^config\.kit\.paths\.base option must either be the empty string or a root-relative path that starts but doesn't end with '\/'. See https:\/\/svelte\.dev\/docs\/kit\/configuration#paths$/); }); test("fails if paths.base ends with '/'", () => { @@ -254,7 +254,7 @@ test("fails if paths.base ends with '/'", () => { } } }); - }, /^config\.kit\.paths\.base option must either be the empty string or a root-relative path that starts but doesn't end with '\/'. See https:\/\/kit\.svelte\.dev\/docs\/configuration#paths$/); + }, /^config\.kit\.paths\.base option must either be the empty string or a root-relative path that starts but doesn't end with '\/'. See https:\/\/svelte\.dev\/docs\/kit\/configuration#paths$/); }); test('fails if paths.assets is relative', () => { @@ -267,7 +267,7 @@ test('fails if paths.assets is relative', () => { } } }); - }, /^config\.kit\.paths\.assets option must be an absolute path, if specified. See https:\/\/kit\.svelte\.dev\/docs\/configuration#paths$/); + }, /^config\.kit\.paths\.assets option must be an absolute path, if specified. See https:\/\/svelte\.dev\/docs\/kit\/configuration#paths$/); }); test('fails if paths.assets has trailing slash', () => { @@ -279,7 +279,7 @@ test('fails if paths.assets has trailing slash', () => { } } }); - }, /^config\.kit\.paths\.assets option must not end with '\/'. See https:\/\/kit\.svelte\.dev\/docs\/configuration#paths$/); + }, /^config\.kit\.paths\.assets option must not end with '\/'. See https:\/\/svelte\.dev\/docs\/kit\/configuration#paths$/); }); test('fails if prerender.entries are invalid', () => { @@ -373,6 +373,6 @@ test('errors on loading config with incorrect default export', async () => { assert.equal( message, - 'svelte.config.js must have a configuration object as its default export. See https://kit.svelte.dev/docs/configuration' + 'svelte.config.js must have a configuration object as its default export. See https://svelte.dev/docs/kit/configuration' ); }); diff --git a/packages/kit/src/core/config/options.js b/packages/kit/src/core/config/options.js index a4b41f2a16c6..70d631d3ada6 100644 --- a/packages/kit/src/core/config/options.js +++ b/packages/kit/src/core/config/options.js @@ -68,7 +68,7 @@ const options = object( message += ', rather than the name of an adapter'; } - throw new Error(`${message}. See https://kit.svelte.dev/docs/adapters`); + throw new Error(`${message}. See https://svelte.dev/docs/kit/adapters`); } return input; @@ -92,7 +92,7 @@ const options = object( if (input) { if (input.startsWith('/') || input.endsWith('/')) { throw new Error( - "config.kit.appDir cannot start or end with '/'. See https://kit.svelte.dev/docs/configuration" + "config.kit.appDir cannot start or end with '/'. See https://svelte.dev/docs/kit/configuration" ); } } else { @@ -151,7 +151,7 @@ const options = object( if (input !== '' && (input.endsWith('/') || !input.startsWith('/'))) { throw new Error( - `${keypath} option must either be the empty string or a root-relative path that starts but doesn't end with '/'. See https://kit.svelte.dev/docs/configuration#paths` + `${keypath} option must either be the empty string or a root-relative path that starts but doesn't end with '/'. See https://svelte.dev/docs/kit/configuration#paths` ); } @@ -163,13 +163,13 @@ const options = object( if (input) { if (!/^[a-z]+:\/\//.test(input)) { throw new Error( - `${keypath} option must be an absolute path, if specified. See https://kit.svelte.dev/docs/configuration#paths` + `${keypath} option must be an absolute path, if specified. See https://svelte.dev/docs/kit/configuration#paths` ); } if (input.endsWith('/')) { throw new Error( - `${keypath} option must not end with '/'. See https://kit.svelte.dev/docs/configuration#paths` + `${keypath} option must not end with '/'. See https://svelte.dev/docs/kit/configuration#paths` ); } } @@ -202,7 +202,7 @@ const options = object( (/** @type {any} */ { message }) => { throw new Error( message + - '\nTo suppress or handle this error, implement `handleHttpError` in https://kit.svelte.dev/docs/configuration#prerender' + '\nTo suppress or handle this error, implement `handleHttpError` in https://svelte.dev/docs/kit/configuration#prerender' ); }, (input, keypath) => { @@ -216,7 +216,7 @@ const options = object( (/** @type {any} */ { message }) => { throw new Error( message + - '\nTo suppress or handle this error, implement `handleMissingId` in https://kit.svelte.dev/docs/configuration#prerender' + '\nTo suppress or handle this error, implement `handleMissingId` in https://svelte.dev/docs/kit/configuration#prerender' ); }, (input, keypath) => { @@ -230,7 +230,7 @@ const options = object( (/** @type {any} */ { message }) => { throw new Error( message + - '\nTo suppress or handle this error, implement `handleEntryGeneratorMismatch` in https://kit.svelte.dev/docs/configuration#prerender' + '\nTo suppress or handle this error, implement `handleEntryGeneratorMismatch` in https://svelte.dev/docs/kit/configuration#prerender' ); }, (input, keypath) => { diff --git a/packages/kit/src/core/postbuild/prerender.js b/packages/kit/src/core/postbuild/prerender.js index 9a83652db866..f2f511d4a98a 100644 --- a/packages/kit/src/core/postbuild/prerender.js +++ b/packages/kit/src/core/postbuild/prerender.js @@ -114,7 +114,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) { ({ status, path, referrer, referenceType }) => { const message = status === 404 && !path.startsWith(config.paths.base) - ? `${path} does not begin with \`base\`, which is configured in \`paths.base\` and can be imported from \`$app/paths\` - see https://kit.svelte.dev/docs/configuration#paths for more info` + ? `${path} does not begin with \`base\`, which is configured in \`paths.base\` and can be imported from \`$app/paths\` - see https://svelte.dev/docs/kit/configuration#paths for more info` : path; return `${status} ${message}${referrer ? ` (${referenceType} from ${referrer})` : ''}`; @@ -126,7 +126,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) { config.prerender.handleMissingId, ({ path, id, referrers }) => { return ( - `The following pages contain links to ${path}#${id}, but no element with id="${id}" exists on ${path} - see the \`handleMissingId\` option in https://kit.svelte.dev/docs/configuration#prerender for more info:` + + `The following pages contain links to ${path}#${id}, but no element with id="${id}" exists on ${path} - see the \`handleMissingId\` option in https://svelte.dev/docs/kit/configuration#prerender for more info:` + referrers.map((l) => `\n - ${l}`).join('') ); } @@ -136,7 +136,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) { log, config.prerender.handleEntryGeneratorMismatch, ({ generatedFromId, entry, matchedId }) => { - return `The entries export from ${generatedFromId} generated entry ${entry}, which was matched by ${matchedId} - see the \`handleEntryGeneratorMismatch\` option in https://kit.svelte.dev/docs/configuration#prerender for more info.`; + return `The entries export from ${generatedFromId} generated entry ${entry}, which was matched by ${matchedId} - see the \`handleEntryGeneratorMismatch\` option in https://svelte.dev/docs/kit/configuration#prerender for more info.`; } ); @@ -385,7 +385,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) { if (response.status === 200) { if (existsSync(dest) && statSync(dest).isDirectory()) { throw new Error( - `Cannot save ${decoded} as it is already a directory. See https://kit.svelte.dev/docs/page-options#prerender-route-conflicts for more information` + `Cannot save ${decoded} as it is already a directory. See https://svelte.dev/docs/kit/page-options#prerender-route-conflicts for more information` ); } @@ -394,7 +394,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) { if (existsSync(dir) && !statSync(dir).isDirectory()) { const parent = decoded.split('/').slice(0, -1).join('/'); throw new Error( - `Cannot save ${decoded} as ${parent} is already a file. See https://kit.svelte.dev/docs/page-options#prerender-route-conflicts for more information` + `Cannot save ${decoded} as ${parent} is already a file. See https://svelte.dev/docs/kit/page-options#prerender-route-conflicts for more information` ); } @@ -509,7 +509,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) { const list = not_prerendered.map((id) => ` - ${id}`).join('\n'); throw new Error( - `The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:\n${list}\n\nSee https://kit.svelte.dev/docs/page-options#prerender-troubleshooting for info on how to solve this` + `The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:\n${list}\n\nSee https://svelte.dev/docs/kit/page-options#prerender-troubleshooting for info on how to solve this` ); } diff --git a/packages/kit/src/core/sync/write_ambient.js b/packages/kit/src/core/sync/write_ambient.js index 40a871cb52de..1f2188097ade 100644 --- a/packages/kit/src/core/sync/write_ambient.js +++ b/packages/kit/src/core/sync/write_ambient.js @@ -7,7 +7,7 @@ import { create_dynamic_types, create_static_types } from '../env.js'; import { write_if_changed } from './utils.js'; // TODO these types should be described in a neutral place, rather than -// inside either `packages/kit` or `kit.svelte.dev` +// inside either `packages/kit` or `svelte.dev/docs/kit` const descriptions_dir = fileURLToPath(new URL('../../../src/types/synthetic', import.meta.url)); /** @param {string} filename */ diff --git a/packages/kit/src/core/sync/write_tsconfig.js b/packages/kit/src/core/sync/write_tsconfig.js index 48114dd562fa..e9df340902e1 100644 --- a/packages/kit/src/core/sync/write_tsconfig.js +++ b/packages/kit/src/core/sync/write_tsconfig.js @@ -166,7 +166,7 @@ function validate_user_config(cwd, out, config) { .bold() .yellow( `You have specified a baseUrl and/or paths in your ${config.kind} which interferes with SvelteKit's auto-generated tsconfig.json. ` + - 'Remove it to avoid problems with intellisense. For path aliases, use `kit.alias` instead: https://kit.svelte.dev/docs/configuration#alias' + 'Remove it to avoid problems with intellisense. For path aliases, use `kit.alias` instead: https://svelte.dev/docs/kit/configuration#alias' ) ); } diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index c61c053171cf..7b706387cbe0 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -23,7 +23,7 @@ import type { PluginOptions } from '@sveltejs/vite-plugin-svelte'; export { PrerenderOption } from '../types/private.js'; /** - * [Adapters](https://kit.svelte.dev/docs/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing. + * [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing. */ export interface Adapter { /** @@ -128,7 +128,7 @@ export interface Builder { generateEnvModule(): void; /** - * Generate a server-side manifest to initialise the SvelteKit [server](https://kit.svelte.dev/docs/types#public-types-server) with. + * Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/types#public-types-server) with. * @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated */ generateManifest(opts: { relativePath: string; routes?: RouteDefinition[] }): string; @@ -189,7 +189,7 @@ export interface Builder { export interface Config { /** - * Options passed to [`svelte.compile`](https://svelte.dev/docs#compile-time-svelte-compile). + * Options passed to [`svelte.compile`](https://svelte.dev/docs/svelte/svelte-compiler#CompileOptions). * @default {} */ compilerOptions?: CompileOptions; @@ -278,7 +278,7 @@ export interface Emulator { export interface KitConfig { /** - * Your [adapter](https://kit.svelte.dev/docs/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms. + * Your [adapter](https://svelte.dev/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms. * @default undefined */ adapter?: Adapter; @@ -351,9 +351,9 @@ export interface KitConfig { * * > [!NOTE] When `mode` is `'auto'`, SvelteKit will use nonces for dynamically rendered pages and hashes for prerendered pages. Using nonces with prerendered pages is insecure and therefore forbidden. * - * > [!NOTE] Note that most [Svelte transitions](https://svelte.dev/tutorial/transition) work by creating an inline `