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
{{ message }}
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: site/content/docs/00-introduction.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ For web developers, the stakes are generally lower than for combat engineers. Bu
32
32
[Next.js](https://github.com/zeit/next.js) is a React framework from [Zeit](https://zeit.co), and is the inspiration for Sapper. There are a few notable differences, however:
33
33
34
34
* Sapper is powered by Svelte instead of React, so it's faster and your apps are smaller
35
-
* Instead of route masking, we encode route parameters in filenames (see the [routing](docs#routing) section below)
35
+
* Instead of route masking, we encode route parameters in filenames (see the [routing](docs#Routing) section below)
36
36
* As well as *pages*, you can create *server routes* in your `src/routes` directory. This makes it very easy to, for example, add a JSON API such as the one powering this very page (try visiting [/docs.json](/docs.json))
37
37
* Links are just `<a>` elements, rather than framework-specific `<Link>` components. That means, for example, that [this link right here](/), despite being inside a blob of markdown, works with the router as you'd expect
Copy file name to clipboardExpand all lines: site/content/docs/01-structure.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@ If you take a look inside the [sapper-template](https://github.com/sveltejs/sapp
24
24
25
25
When you first run Sapper, it will create an additional `__sapper__` directory containing generated files.
26
26
27
-
You'll notice a few extra files and a `cypress` directory which relates to [testing](docs#testing) — we don't need to worry about those right now.
27
+
You'll notice a few extra files and a `cypress` directory which relates to [testing](docs#Testing) — we don't need to worry about those right now.
28
28
29
-
> You *can* create these files from scratch, but it's much better to use the template. See [getting started](docs#getting-started) for instructions on how to easily clone it
29
+
> You *can* create these files from scratch, but it's much better to use the template. See [getting started](docs#Getting_started) for instructions on how to easily clone it
30
30
31
31
32
32
### package.json
@@ -35,9 +35,9 @@ Your package.json contains your app's dependencies and defines a number of scrip
35
35
36
36
*`npm run dev` — start the app in development mode, and watch source files for changes
37
37
*`npm run build` — build the app in production mode
38
-
*`npm run export` — bake out a static version, if applicable (see [exporting](docs#exporting))
38
+
*`npm run export` — bake out a static version, if applicable (see [exporting](docs#Exporting))
39
39
*`npm start` — start the app in production mode after you've built it
40
-
*`npm test` — run the tests (see [testing](docs#testing))
40
+
*`npm test` — run the tests (see [testing](docs#Testing))
41
41
42
42
43
43
### src
@@ -56,7 +56,7 @@ sapper.start({
56
56
});
57
57
```
58
58
59
-
In many cases, that's the entirety of your entry module, though you can do as much or as little here as you wish. See the [client API](docs#client-api) section for more information on functions you can import.
59
+
In many cases, that's the entirety of your entry module, though you can do as much or as little here as you wish. See the [client API](docs#Client_API) section for more information on functions you can import.
60
60
61
61
62
62
#### src/server.js
@@ -88,7 +88,7 @@ Because every app needs a slightly different service worker (sometimes it's appr
88
88
89
89
This file is a template for responses from the server. Sapper will inject content that replaces the following tags:
90
90
91
-
*`%sapper.base%` — a `<base>` element (see [base URLs](docs#base-urls))
91
+
*`%sapper.base%` — a `<base>` element (see [base URLs](docs#Base_URLs))
92
92
*`%sapper.styles%` — critical CSS for the page being requested
93
93
*`%sapper.head%` — HTML representing page-specific `<head>` contents, like `<title>`
94
94
*`%sapper.html%` — HTML representing the body of the page being rendered
Copy file name to clipboardExpand all lines: site/content/docs/03-client-api.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Programmatically navigates to the given `href`. If the destination is a Sapper r
36
36
37
37
*`href` — the page to prefetch
38
38
39
-
Programmatically prefetches the given page, which means a) ensuring that the code for the page is loaded, and b) calling the page's `preload` method with the appropriate options. This is the same behaviour that Sapper triggers when the user taps or mouses over an `<a>` element with [rel=prefetch](docs#prefetching).
39
+
Programmatically prefetches the given page, which means a) ensuring that the code for the page is loaded, and b) calling the page's `preload` method with the appropriate options. This is the same behaviour that Sapper triggers when the user taps or mouses over an `<a>` element with [rel=prefetch](docs#Prefetching).
Copy file name to clipboardExpand all lines: site/content/docs/04-preloading.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Preloading
3
3
---
4
4
5
-
As seen in the [routing](docs#routing) section, page components can have an optional `preload` function that will load some data that the page depends on. This is similar to `getInitialProps` in Next.js or `asyncData` in Nuxt.js.
5
+
As seen in the [routing](docs#Routing) section, page components can have an optional `preload` function that will load some data that the page depends on. This is similar to `getInitialProps` in Next.js or `asyncData` in Nuxt.js.
0 commit comments