From 670f92b1b033eb179f53546d943891a5e807467c Mon Sep 17 00:00:00 2001 From: Ignatius Bagus Date: Tue, 21 Dec 2021 17:14:02 +0700 Subject: [PATCH] tutorial links in text files --- site/content/tutorial/01-introduction/01-basics/text.md | 2 +- .../tutorial/01-introduction/07-making-an-app/text.md | 6 +++--- site/content/tutorial/05-events/05-event-forwarding/text.md | 2 +- .../06-bindings/07-multiple-select-bindings/text.md | 2 +- site/content/tutorial/06-bindings/12-bind-this/text.md | 2 +- site/content/tutorial/07-lifecycle/01-onmount/text.md | 2 +- .../tutorial/08-stores/02-auto-subscriptions/text.md | 2 +- site/content/tutorial/08-stores/04-derived-stores/text.md | 2 +- .../10-transitions/04-custom-css-transitions/text.md | 2 +- site/content/tutorial/11-animations/01-animate/text.md | 2 +- site/content/tutorial/15-context/01-context-api/text.md | 2 +- .../tutorial/16-special-elements/03-svelte-window/text.md | 2 +- .../tutorial/16-special-elements/06-svelte-head/text.md | 2 +- .../tutorial/16-special-elements/07-svelte-options/text.md | 2 +- .../tutorial/19-next-steps/01-congratulations/text.md | 6 +++--- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/site/content/tutorial/01-introduction/01-basics/text.md b/site/content/tutorial/01-introduction/01-basics/text.md index c0fa2f48a3..08ba922b42 100644 --- a/site/content/tutorial/01-introduction/01-basics/text.md +++ b/site/content/tutorial/01-introduction/01-basics/text.md @@ -4,7 +4,7 @@ title: Basics Welcome to the Svelte tutorial. This will teach you everything you need to know to build fast, small web applications easily. -You can also consult the [API docs](docs) and the [examples](examples), or — if you're impatient to start hacking on your machine locally — the [60-second quickstart](blog/the-easiest-way-to-get-started). +You can also consult the [API docs](/docs) and the [examples](/examples), or — if you're impatient to start hacking on your machine locally — the [60-second quickstart](/blog/the-easiest-way-to-get-started). ## What is Svelte? diff --git a/site/content/tutorial/01-introduction/07-making-an-app/text.md b/site/content/tutorial/01-introduction/07-making-an-app/text.md index ea387120e4..3e1589cd87 100644 --- a/site/content/tutorial/01-introduction/07-making-an-app/text.md +++ b/site/content/tutorial/01-introduction/07-making-an-app/text.md @@ -12,9 +12,9 @@ First, you'll need to integrate Svelte with a build tool. There are officially m ...and a variety of [community-maintained ones](https://sveltesociety.dev/tools). -Don't worry if you're relatively new to web development and haven't used these tools before. We've prepared a simple step-by-step guide, [Svelte for new developers](blog/svelte-for-new-developers), which walks you through the process. +Don't worry if you're relatively new to web development and haven't used these tools before. We've prepared a simple step-by-step guide, [Svelte for new developers](/blog/svelte-for-new-developers), which walks you through the process. -You'll also want to configure your text editor. There are [plugins](https://sveltesociety.dev/tools#editor-support) for many popular editors as well as an official [VS Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If your editor does not have a Svelte plugin then you can follow [this guide](blog/setting-up-your-editor) to configure your text editor to treat `.svelte` files the same as `.html` for the sake of syntax highlighting. +You'll also want to configure your text editor. There are [plugins](https://sveltesociety.dev/tools#editor-support) for many popular editors as well as an official [VS Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If your editor does not have a Svelte plugin then you can follow [this guide](/blog/setting-up-your-editor) to configure your text editor to treat `.svelte` files the same as `.html` for the sake of syntax highlighting. Then, once you've got your project set up, using Svelte components is easy. The compiler turns each component into a regular JavaScript class — just import it and instantiate with `new`: @@ -30,4 +30,4 @@ const app = new App({ }); ``` -You can then interact with `app` using the [component API](docs#run-time-client-side-component-api) if you need to. +You can then interact with `app` using the [component API](/docs#run-time-client-side-component-api) if you need to. diff --git a/site/content/tutorial/05-events/05-event-forwarding/text.md b/site/content/tutorial/05-events/05-event-forwarding/text.md index b65a028f27..514b812aba 100644 --- a/site/content/tutorial/05-events/05-event-forwarding/text.md +++ b/site/content/tutorial/05-events/05-event-forwarding/text.md @@ -4,7 +4,7 @@ title: Event forwarding Unlike DOM events, component events don't *bubble*. If you want to listen to an event on some deeply nested component, the intermediate components must *forward* the event. -In this case, we have the same `App.svelte` and `Inner.svelte` as in the [previous chapter](tutorial/component-events), but there's now an `Outer.svelte` component that contains ``. +In this case, we have the same `App.svelte` and `Inner.svelte` as in the [previous chapter](/tutorial/component-events), but there's now an `Outer.svelte` component that contains ``. One way we could solve the problem is adding `createEventDispatcher` to `Outer.svelte`, listening for the `message` event, and creating a handler for it: diff --git a/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md b/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md index 42263e5ec1..e607100c56 100644 --- a/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md +++ b/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md @@ -4,7 +4,7 @@ title: Select multiple A select can have a `multiple` attribute, in which case it will populate an array rather than selecting a single value. -Returning to our [earlier ice cream example](tutorial/group-inputs), we can replace the checkboxes with a ``: ```html

Flavours

diff --git a/site/content/tutorial/06-bindings/12-bind-this/text.md b/site/content/tutorial/06-bindings/12-bind-this/text.md index 4784b6b13f..6602e4de76 100644 --- a/site/content/tutorial/06-bindings/12-bind-this/text.md +++ b/site/content/tutorial/06-bindings/12-bind-this/text.md @@ -12,4 +12,4 @@ The readonly `this` binding applies to every element (and component) and allows > ``` -Note that the value of `canvas` will be `undefined` until the component has mounted, so we put the logic inside the `onMount` [lifecycle function](tutorial/onmount). +Note that the value of `canvas` will be `undefined` until the component has mounted, so we put the logic inside the `onMount` [lifecycle function](/tutorial/onmount). diff --git a/site/content/tutorial/07-lifecycle/01-onmount/text.md b/site/content/tutorial/07-lifecycle/01-onmount/text.md index 54b385e889..f24fce5fc2 100644 --- a/site/content/tutorial/07-lifecycle/01-onmount/text.md +++ b/site/content/tutorial/07-lifecycle/01-onmount/text.md @@ -4,7 +4,7 @@ title: onMount Every component has a *lifecycle* that starts when it is created, and ends when it is destroyed. There are a handful of functions that allow you to run code at key moments during that lifecycle. -The one you'll use most frequently is `onMount`, which runs after the component is first rendered to the DOM. We briefly encountered it [earlier](tutorial/bind-this) when we needed to interact with a `` element after it had been rendered. +The one you'll use most frequently is `onMount`, which runs after the component is first rendered to the DOM. We briefly encountered it [earlier](/tutorial/bind-this) when we needed to interact with a `` element after it had been rendered. We'll add an `onMount` handler that loads some data over the network: diff --git a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md index 27d3251c6e..fc7967f658 100644 --- a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md +++ b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md @@ -13,7 +13,7 @@ const unsubscribe = count.subscribe(value => { ``` > Calling a `subscribe` method returns an `unsubscribe` function. -You now declared `unsubscribe`, but it still needs to be called, for example through the `onDestroy` [lifecycle hook](tutorial/ondestroy): +You now declared `unsubscribe`, but it still needs to be called, for example through the `onDestroy` [lifecycle hook](/tutorial/ondestroy): ```html