You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/14-configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,6 @@ const config = {
56
56
prerender: {
57
57
concurrency:1,
58
58
crawl:true,
59
-
createIndexFiles:true,
60
59
enabled:true,
61
60
entries: ['*'],
62
61
onError:'fail'
@@ -203,7 +202,6 @@ See [Prerendering](/docs/page-options#prerender). An object containing zero or m
203
202
204
203
-`concurrency` — how many pages can be prerendered simultaneously. JS is single-threaded, but in cases where prerendering performance is network-bound (for example loading content from a remote CMS) this can speed things up by processing other tasks while waiting on the network response
205
204
-`crawl` — determines whether SvelteKit should find pages to prerender by following links from the seed page(s)
206
-
-`createIndexFiles` - if set to `false`, will render `about.html` instead of `about/index.html`
207
205
-`enabled` — set to `false` to disable prerendering altogether
208
206
-`entries` — an array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all non-dynamic routes (i.e. pages with no `[parameters]` )
209
207
-`onError`
@@ -249,6 +247,8 @@ Whether to remove, append, or ignore trailing slashes when resolving URLs to rou
249
247
- `"always"` — redirect `/x` to `/x/`
250
248
- `"ignore"` — don't automatically add or remove trailing slashes. `/x` and `/x/` will be treated equivalently
251
249
250
+
This option also affects [prerendering](/docs/page-options#prerender). If `trailingSlash` is `always`, a route like `/about` will result in an `about/index.html` file, otherwise it will create `about.html`, mirroring static webserver conventions.
251
+
252
252
> Ignoring trailing slashes is not recommended — the semantics of relative paths differ between the two cases (`./y` from `/x` is `/y`, but from `/x/` is `/x/y`), and `/x` and `/x/` are treated as separate URLs which is harmful to SEO. If you use this option, ensure that you implement logic for conditionally adding or removing trailing slashes from `request.path` inside your [`handle`](/docs/hooks#handle) function.
Copy file name to clipboardExpand all lines: packages/kit/src/core/config/options.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,9 @@ const options = object(
186
186
prerender: object({
187
187
concurrency: number(1),
188
188
crawl: boolean(true),
189
-
createIndexFiles: boolean(true),
189
+
createIndexFiles: error(
190
+
(keypath)=>`${keypath} has been removed — it is now controlled by the trailingSlash option. See https://kit.svelte.dev/docs/configuration#trailingslash`
0 commit comments