From b22160e3a8aabe3404f82dbb3bff12dc740b1681 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sat, 22 May 2021 21:30:06 -0700 Subject: [PATCH] Add appendix docs regarding different rendering methods --- documentation/docs/00-introduction.md | 2 +- documentation/docs/11-ssr-and-javascript.md | 14 ++++---- ...oubleshooting.md => 90-troubleshooting.md} | 0 documentation/docs/99-appendix.md | 33 +++++++++++++++++++ 4 files changed, 41 insertions(+), 8 deletions(-) rename documentation/docs/{99-troubleshooting.md => 90-troubleshooting.md} (100%) create mode 100644 documentation/docs/99-appendix.md diff --git a/documentation/docs/00-introduction.md b/documentation/docs/00-introduction.md index 745324addda7..e82a49813843 100644 --- a/documentation/docs/00-introduction.md +++ b/documentation/docs/00-introduction.md @@ -15,7 +15,7 @@ SvelteKit is a framework for building extremely high-performance web apps. You'r - Each page of your app is a [Svelte](https://svelte.dev) component - You create pages by adding files to the `src/routes` directory of your project. These will be server-rendered so that a user's first visit to your app is as fast as possible, then a client-side app takes over -Building an app with all the modern best practices — code-splitting, offline support, server-rendered views with client-side hydration — is fiendishly complicated. SvelteKit does all the boring stuff for you so that you can get on with the creative part. +Building an app with all the modern best practices — code-splitting, [offline support](#service-workers), [server-rendered views](#appendix-ssr) with [client-side hydration](#appendix-hydration) — is fiendishly complicated. SvelteKit does all the boring stuff for you so that you can get on with the creative part. You don't need to know Svelte to understand the rest of this guide, but it will help. In short, it's a UI framework that compiles your components to highly optimized vanilla JavaScript. Read the [introductory blog post](https://svelte.dev/blog/svelte-3-rethinking-reactivity) and the [tutorial](https://svelte.dev/tutorial) to learn more. diff --git a/documentation/docs/11-ssr-and-javascript.md b/documentation/docs/11-ssr-and-javascript.md index 22dbef0210ac..fe9b3e0721a7 100644 --- a/documentation/docs/11-ssr-and-javascript.md +++ b/documentation/docs/11-ssr-and-javascript.md @@ -10,9 +10,9 @@ If both are specified, per-page settings override per-app settings in case of co ### ssr -Disabling server-side rendering effectively turns your SvelteKit app into a **single-page app** or SPA. +Disabling [server-side rendering](#appendix-ssr) effectively turns your SvelteKit app into a [**single-page app** or SPA](#appendix-csr-and-spa). -> In most situations this is not recommended: it harms SEO, tends to slow down perceived performance, and makes your app inaccessible to users if JavaScript fails or is disabled (which happens [more often than you probably think](https://kryogenix.org/code/browser/everyonehasjs.html)). Sometimes it's appropriate or even necessary, but consider alternatives before disabling SSR. +> In most situations this is not recommended: see [the discussion in the appendix](#appendix-ssr). Consider whether it's truly appropriate to disable and don't simply disable SSR because you've hit an issue with it. You can disable SSR app-wide with the [`ssr` config option](#configuration-ssr), or a page-level `ssr` export: @@ -24,9 +24,9 @@ You can disable SSR app-wide with the [`ssr` config option](#configuration-ssr), ### router -SvelteKit includes a client-side router that intercepts navigations (from the user clicking on links, or interacting with the back/forward buttons) and updates the page contents, rather than letting the browser handle the navigation by reloading. +SvelteKit includes a [client-side router](#appendix-routing) that intercepts navigations (from the user clicking on links, or interacting with the back/forward buttons) and updates the page contents, rather than letting the browser handle the navigation by reloading. -In certain circumstances you might need to disable this behaviour with the app-wide [`router` config option](#configuration-router) or the page-level `router` export: +In certain circumstances you might need to disable [client-side routing](#appendix-routing) with the app-wide [`router` config option](#configuration-router) or the page-level `router` export: ```html