Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/docs/05-misc/01-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Frequently asked questions

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

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.
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.

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.

Expand Down
11 changes: 10 additions & 1 deletion packages/svelte/scripts/generate-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));

fs.writeFileSync(
'./src/shared/version.js',
`// generated during release, do not modify\n\n/** @type {string} */\nexport const VERSION = '${pkg.version}';\n`
`// generated during release, do not modify
/**
* The current version, as set in package.json.
*
* https://svelte.dev/docs/svelte-compiler#svelte-version
* @type {string}
*/
export const VERSION = '${pkg.version}';
`
);
2 changes: 1 addition & 1 deletion sites/svelte.dev/src/lib/server/markdown/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ function syntax_highlight({ source, filename, language, highlighter, twoslashBan
};
});

html = `<pre class="language-diff"><code>${lines
html = `<pre class="language-diff" style="background-color: var(--shiki-color-background)"><code>${lines
.map((line) => {
if (line.type) return `<span class="${line.type}">${line.content}\n</span>`;
return line.content + '\n';
Expand Down
6 changes: 5 additions & 1 deletion sites/svelte.dev/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { browser } from '$app/environment';
import { page } from '$app/stores';
import { Icon, Shell } from '@sveltejs/site-kit/components';
import { Nav } from '@sveltejs/site-kit/nav';
import { Nav, Separator } from '@sveltejs/site-kit/nav';
import { Search, SearchBox } from '@sveltejs/site-kit/search';
import '@sveltejs/site-kit/styles/index.css';

Expand Down Expand Up @@ -35,8 +35,12 @@
</svelte:fragment>

<svelte:fragment slot="external-links">
<a href="https://learn.svelte.dev/">Tutorial</a>

<a href="https://kit.svelte.dev">SvelteKit</a>

<Separator />

<a href="/chat" title="Discord Chat">
<span class="small">Discord</span>
<span class="large"><Icon name="discord" /></span>
Expand Down
5 changes: 3 additions & 2 deletions sites/svelte.dev/src/routes/_components/Hero.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</strong>
<div class="buttons">
<a href="https://learn.svelte.dev" rel="external" class="cta">
tutorial <Icon name="arrow-right" />
tutorial<Icon name="external-link" size="1em" />
</a>
<a href="/docs/introduction" class="cta basic">read the docs</a>
</div>
Expand Down Expand Up @@ -86,11 +86,12 @@
.cta {
display: inline-flex;
align-items: center;
gap: 0.5rem;
gap: 0.1rem;
background: var(--sk-theme-1);
padding: 0.35em 0.8em;
font-size: var(--sk-text-s);
letter-spacing: 0.05em;
font-weight: 600;
white-space: nowrap;
border-radius: var(--sk-border-radius);
box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.08);
Expand Down
13 changes: 0 additions & 13 deletions sites/svelte.dev/src/routes/nav.json/+server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { get_blog_data, get_blog_list } from '$lib/server/blog/index.js';
import { get_docs_data, get_docs_list } from '$lib/server/docs/index.js';
import { get_examples_data, get_examples_list } from '$lib/server/examples/index.js';
import { get_tutorial_data, get_tutorial_list } from '$lib/server/tutorial/index.js';
import { json } from '@sveltejs/kit';

export const prerender = true;
Expand Down Expand Up @@ -33,12 +32,6 @@ async function get_nav_list() {
}
];

const tutorial_list = get_tutorial_list(get_tutorial_data());
const processed_tutorial_list = tutorial_list.map(({ title, tutorials }) => ({
title,
sections: tutorials.map(({ title, slug }) => ({ title, path: '/tutorial/' + slug }))
}));

const examples_list = get_examples_list(get_examples_data());
const processed_examples_list = examples_list
.map(({ title, examples }) => ({
Expand All @@ -48,12 +41,6 @@ async function get_nav_list() {
.filter(({ title }) => title !== 'Embeds');

return [
{
title: 'Tutorial',
prefix: 'tutorial',
pathname: '/tutorial',
sections: processed_tutorial_list
},
{
title: 'Docs',
prefix: 'docs',
Expand Down