Skip to content

Commit cf32fa2

Browse files
PuruVJbenmccann
andauthored
fix(site): update tutorial links (#8780)
Co-authored-by: Ben McCann <[email protected]>
1 parent be5742a commit cf32fa2

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

documentation/docs/05-misc/01-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Frequently asked questions
44

55
## I'm new to Svelte. Where should I start?
66

7-
We think the best way to get started is playing through the interactive [tutorial](/tutorial). Each step there is mainly focused on one specific aspect and is easy to follow. You'll be editing and running real Svelte components right in your browser.
7+
We think the best way to get started is playing through the interactive [tutorial](https://learn.svelte.dev/). Each step there is mainly focused on one specific aspect and is easy to follow. You'll be editing and running real Svelte components right in your browser.
88

99
Five to ten minutes should be enough to get you up and running. An hour and a half should get you through the entire tutorial.
1010

packages/svelte/scripts/generate-version.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,14 @@ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
44

55
fs.writeFileSync(
66
'./src/shared/version.js',
7-
`// generated during release, do not modify\n\n/** @type {string} */\nexport const VERSION = '${pkg.version}';\n`
7+
`// generated during release, do not modify
8+
9+
/**
10+
* The current version, as set in package.json.
11+
*
12+
* https://svelte.dev/docs/svelte-compiler#svelte-version
13+
* @type {string}
14+
*/
15+
export const VERSION = '${pkg.version}';
16+
`
817
);

sites/svelte.dev/src/lib/server/markdown/renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ function syntax_highlight({ source, filename, language, highlighter, twoslashBan
921921
};
922922
});
923923

924-
html = `<pre class="language-diff"><code>${lines
924+
html = `<pre class="language-diff" style="background-color: var(--shiki-color-background)"><code>${lines
925925
.map((line) => {
926926
if (line.type) return `<span class="${line.type}">${line.content}\n</span>`;
927927
return line.content + '\n';

sites/svelte.dev/src/routes/+layout.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { browser } from '$app/environment';
33
import { page } from '$app/stores';
44
import { Icon, Shell } from '@sveltejs/site-kit/components';
5-
import { Nav } from '@sveltejs/site-kit/nav';
5+
import { Nav, Separator } from '@sveltejs/site-kit/nav';
66
import { Search, SearchBox } from '@sveltejs/site-kit/search';
77
import '@sveltejs/site-kit/styles/index.css';
88
@@ -35,8 +35,12 @@
3535
</svelte:fragment>
3636

3737
<svelte:fragment slot="external-links">
38+
<a href="https://learn.svelte.dev/">Tutorial</a>
39+
3840
<a href="https://kit.svelte.dev">SvelteKit</a>
3941

42+
<Separator />
43+
4044
<a href="/chat" title="Discord Chat">
4145
<span class="small">Discord</span>
4246
<span class="large"><Icon name="discord" /></span>

sites/svelte.dev/src/routes/_components/Hero.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</strong>
1818
<div class="buttons">
1919
<a href="https://learn.svelte.dev" rel="external" class="cta">
20-
tutorial <Icon name="arrow-right" />
20+
tutorial<Icon name="external-link" size="1em" />
2121
</a>
2222
<a href="/docs/introduction" class="cta basic">read the docs</a>
2323
</div>
@@ -86,11 +86,12 @@
8686
.cta {
8787
display: inline-flex;
8888
align-items: center;
89-
gap: 0.5rem;
89+
gap: 0.1rem;
9090
background: var(--sk-theme-1);
9191
padding: 0.35em 0.8em;
9292
font-size: var(--sk-text-s);
9393
letter-spacing: 0.05em;
94+
font-weight: 600;
9495
white-space: nowrap;
9596
border-radius: var(--sk-border-radius);
9697
box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.08);

sites/svelte.dev/src/routes/nav.json/+server.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { get_blog_data, get_blog_list } from '$lib/server/blog/index.js';
22
import { get_docs_data, get_docs_list } from '$lib/server/docs/index.js';
33
import { get_examples_data, get_examples_list } from '$lib/server/examples/index.js';
4-
import { get_tutorial_data, get_tutorial_list } from '$lib/server/tutorial/index.js';
54
import { json } from '@sveltejs/kit';
65

76
export const prerender = true;
@@ -33,12 +32,6 @@ async function get_nav_list() {
3332
}
3433
];
3534

36-
const tutorial_list = get_tutorial_list(get_tutorial_data());
37-
const processed_tutorial_list = tutorial_list.map(({ title, tutorials }) => ({
38-
title,
39-
sections: tutorials.map(({ title, slug }) => ({ title, path: '/tutorial/' + slug }))
40-
}));
41-
4235
const examples_list = get_examples_list(get_examples_data());
4336
const processed_examples_list = examples_list
4437
.map(({ title, examples }) => ({
@@ -48,12 +41,6 @@ async function get_nav_list() {
4841
.filter(({ title }) => title !== 'Embeds');
4942

5043
return [
51-
{
52-
title: 'Tutorial',
53-
prefix: 'tutorial',
54-
pathname: '/tutorial',
55-
sections: processed_tutorial_list
56-
},
5744
{
5845
title: 'Docs',
5946
prefix: 'docs',

0 commit comments

Comments
 (0)