-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bring content across * WIP * docs mostly working * avoid prerendering stuff * hmm
- Loading branch information
1 parent
4959f13
commit dadee6a
Showing
59 changed files
with
472 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
apps/svelte.dev/src/lib/content/docs/svelte/01-introduction/01-overview.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Overview | ||
--- | ||
|
||
- Short intro to what Svelte is and why it's the best ever | ||
- A few code examples to have a very rough understanding of how Svelte code looks like | ||
- Jump off points to tutorial, SvelteKit etc | ||
|
||
## One | ||
|
||
TODO | ||
|
||
## Two | ||
|
||
TODO |
8 changes: 8 additions & 0 deletions
8
apps/svelte.dev/src/lib/content/docs/svelte/01-introduction/02-getting-started.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Getting started | ||
--- | ||
|
||
- `npm create svelte@latest`, describe that it scaffolds SvelteKit project | ||
- `npm create vite@latest`, describe that it scaffolds Svelte SPA powered by Vite | ||
- mention `svelte-add` | ||
- Jump off points to tutorial, SvelteKit etc |
3 changes: 3 additions & 0 deletions
3
apps/svelte.dev/src/lib/content/docs/svelte/01-introduction/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Introduction | ||
--- |
6 changes: 6 additions & 0 deletions
6
...dev/src/lib/content/docs/svelte/02-template-syntax/01-component-fundamentals.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Component fundamentals | ||
--- | ||
|
||
- script (module) / template / style (rough overview) | ||
- `$props` / `$state` (in the context of components) |
5 changes: 5 additions & 0 deletions
5
apps/svelte.dev/src/lib/content/docs/svelte/02-template-syntax/02-basic-markup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Basic markup | ||
--- | ||
|
||
- [basically what we have in the Svelte docs today](https://svelte.dev/docs/basic-markup) |
8 changes: 8 additions & 0 deletions
8
apps/svelte.dev/src/lib/content/docs/svelte/02-template-syntax/03-control-flow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Control flow | ||
--- | ||
|
||
- if | ||
- each | ||
- await (or move that into some kind of data loading section?) | ||
- NOT: key (move into transition section, because that's the common use case) |
10 changes: 10 additions & 0 deletions
10
apps/svelte.dev/src/lib/content/docs/svelte/02-template-syntax/04-snippets.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Snippets | ||
--- | ||
|
||
Better title needed? | ||
|
||
- `#snippet` | ||
- `@render` | ||
- how they can be used to reuse markup | ||
- how they can be used to pass UI content to components |
9 changes: 9 additions & 0 deletions
9
...lte.dev/src/lib/content/docs/svelte/02-template-syntax/05-styles-and-classes.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Styles & Classes | ||
--- | ||
|
||
- style scoping | ||
- `:global` | ||
- `style:` | ||
- `class:` | ||
- `--css` props |
10 changes: 10 additions & 0 deletions
10
...src/lib/content/docs/svelte/02-template-syntax/06-transitions-and-animations.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Transitions & Animations | ||
--- | ||
|
||
- how to use (template syntax) | ||
- when to use | ||
- global vs local | ||
- easing & motion | ||
- mention imports | ||
- key block |
7 changes: 7 additions & 0 deletions
7
apps/svelte.dev/src/lib/content/docs/svelte/02-template-syntax/07-actions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Actions | ||
--- | ||
|
||
- template syntax | ||
- how to write | ||
- typings |
7 changes: 7 additions & 0 deletions
7
apps/svelte.dev/src/lib/content/docs/svelte/02-template-syntax/08-bindings.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Bindings | ||
--- | ||
|
||
- how for dom elements | ||
- list of all bindings | ||
- how for components |
5 changes: 5 additions & 0 deletions
5
...velte.dev/src/lib/content/docs/svelte/02-template-syntax/09-special-elements.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Special elements | ||
--- | ||
|
||
- [basically what we have in the docs today](https://svelte.dev/docs/special-elements) |
3 changes: 3 additions & 0 deletions
3
apps/svelte.dev/src/lib/content/docs/svelte/02-template-syntax/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Template syntax | ||
--- |
9 changes: 9 additions & 0 deletions
9
apps/svelte.dev/src/lib/content/docs/svelte/03-runes/01-state.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: State | ||
--- | ||
|
||
- `$state` (.frozen) | ||
- `$derived` (.by) | ||
- using classes | ||
- getters/setters (what to do to keep reactivity "alive") | ||
- universal reactivity |
6 changes: 6 additions & 0 deletions
6
apps/svelte.dev/src/lib/content/docs/svelte/03-runes/02-side-effects.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Side effects | ||
--- | ||
|
||
- `$effect` (.pre) | ||
- when not to use it, better patterns for what to do instead |
3 changes: 3 additions & 0 deletions
3
apps/svelte.dev/src/lib/content/docs/svelte/03-runes/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Runes | ||
--- |
6 changes: 6 additions & 0 deletions
6
apps/svelte.dev/src/lib/content/docs/svelte/04-runtime/01-stores.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Stores | ||
--- | ||
|
||
- how to use | ||
- how to write |
6 changes: 6 additions & 0 deletions
6
apps/svelte.dev/src/lib/content/docs/svelte/04-runtime/02-context.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Context | ||
--- | ||
|
||
- get/set/hasContext | ||
- how to use, best practises (like encapsulating them) |
8 changes: 8 additions & 0 deletions
8
apps/svelte.dev/src/lib/content/docs/svelte/04-runtime/03-lifecycle-hooks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Lifecycle hooks | ||
--- | ||
|
||
- onMount/onDestroy | ||
- mention that `$effect` might be better for your use case | ||
- beforeUpdate/afterUpdate with deprecation notice? | ||
- or skip this entirely and only have it in the reference docs? |
11 changes: 11 additions & 0 deletions
11
...velte.dev/src/lib/content/docs/svelte/04-runtime/04-imperative-component-api.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Imperative component API | ||
--- | ||
|
||
better title needed? | ||
|
||
- mount | ||
- unmount | ||
- render | ||
- hydrate | ||
- how they interact with each other |
3 changes: 3 additions & 0 deletions
3
apps/svelte.dev/src/lib/content/docs/svelte/04-runtime/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Runtime | ||
--- |
6 changes: 6 additions & 0 deletions
6
apps/svelte.dev/src/lib/content/docs/svelte/05-misc/01-debugging.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Debugging | ||
--- | ||
|
||
- `@debug` | ||
- `$inspect` |
8 changes: 8 additions & 0 deletions
8
apps/svelte.dev/src/lib/content/docs/svelte/05-misc/02-testing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Testing | ||
--- | ||
|
||
- component testing basics | ||
- rune testing basics | ||
- vitest setup | ||
- e2e |
9 changes: 9 additions & 0 deletions
9
apps/svelte.dev/src/lib/content/docs/svelte/05-misc/03-typescript.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: TypeScript | ||
--- | ||
|
||
- [basically what we have today](https://svelte.dev/docs/typescript) | ||
- built-in support, but only for type-only features | ||
- generics | ||
- using `Component` and the other helper types | ||
- using `svelte-check` |
5 changes: 5 additions & 0 deletions
5
apps/svelte.dev/src/lib/content/docs/svelte/05-misc/04-custom-elements-api.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Custom elements API | ||
--- | ||
|
||
- [basically what we have today](https://svelte.dev/docs/custom-elements-api) |
6 changes: 6 additions & 0 deletions
6
apps/svelte.dev/src/lib/content/docs/svelte/05-misc/05-reactivity-indepth.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Reactivity indepth | ||
--- | ||
|
||
- how to think about Runes ("just JavaScript" with added reactivity, what this means for keeping reactivity alive across boundaries) | ||
- signals |
5 changes: 5 additions & 0 deletions
5
apps/svelte.dev/src/lib/content/docs/svelte/05-misc/06-svelte-5-migration-guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Svelte 5 migration guide | ||
--- | ||
|
||
- the stuff from the preview docs and possibly more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Misc | ||
--- |
9 changes: 9 additions & 0 deletions
9
apps/svelte.dev/src/lib/content/docs/svelte/98-reference/01-state.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: $state | ||
--- | ||
|
||
TODO | ||
|
||
- add other pages | ||
- figure out a way to get separator titles in here, so we can have a 'runes' section and an 'imports' section and an 'errors/warnings' section without introducing another layer of nesting | ||
- figure out a good way to import reference docs from other repos that works locally and in prod |
3 changes: 3 additions & 0 deletions
3
apps/svelte.dev/src/lib/content/docs/svelte/98-reference/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Reference | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Svelte | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { read } from '$app/server'; | ||
import { create_index } from '@sveltejs/site-kit/server/content'; | ||
|
||
const markdown_modules = import.meta.glob<{ default: string }>('../content/**/*.md', { | ||
eager: true, | ||
query: '?url' | ||
}); | ||
|
||
export const index = await create_index(markdown_modules, read); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.