|
7 | 7 | // This mapping does a best effort to redirect to the new docs.
|
8 | 8 | const mappings = [
|
9 | 9 | ['before-we-begin', 'overview'],
|
10 |
| - ['getting-started', 'getting-started'], |
| 10 | + ['getting-started', 'overview'], |
11 | 11 | ['component-format', 'svelte-files'],
|
12 |
| - ['template-syntax-if', 'control-flow'], |
13 |
| - ['template-syntax-each', 'control-flow'], |
14 |
| - ['template-syntax-await', 'control-flow'], |
15 |
| - ['template-syntax-key', 'control-flow'], |
| 12 | + ['template-syntax-if', 'if'], |
| 13 | + ['template-syntax-each', 'each'], |
| 14 | + ['template-syntax-await', 'await'], |
| 15 | + ['template-syntax-key', 'key'], |
16 | 16 | ['template-syntax-element-directives', 'basic-markup'],
|
17 | 17 | ['template-syntax-element-directives-bind', 'bindings'],
|
18 |
| - ['template-syntax-element-directives-class', 'styles-and-classes'], |
19 |
| - ['template-syntax-element-directives-style', 'styles-and-classes'], |
20 |
| - ['template-syntax-element-directives-use-action', 'actions'], |
21 |
| - ['template-syntax-element-directives-transition-fn', 'transitions-and-animations'], |
22 |
| - ['template-syntax-element-directives-in-fn-out-fn', 'transitions-and-animations'], |
23 |
| - ['template-syntax-element-directives-animate-fn', 'transitions-and-animations'], |
24 |
| - ['template-syntax-component-directives', 'component fundamentals'], |
25 |
| - ['template-syntax-svelte', 'special-elements'], |
| 18 | + ['template-syntax-element-directives-class', 'class'], |
| 19 | + ['template-syntax-element-directives-style', 'style'], |
| 20 | + ['template-syntax-element-directives-use-action', 'use'], |
| 21 | + ['template-syntax-element-directives-transition-fn', 'transition'], |
| 22 | + ['template-syntax-element-directives-in-fn-out-fn', 'in-and-out'], |
| 23 | + ['template-syntax-element-directives-animate-fn', 'animate'], |
| 24 | + ['template-syntax-component-directives', 'basic-markup'], |
| 25 | + // not sure what lived here |
| 26 | + // if I guessed right, there's not a great one for this |
| 27 | + ['template-syntax-svelte', 'svelte-window'], |
26 | 28 | ['template-syntax', 'basic-markup'],
|
27 | 29 | ['run-time-svelte-store', 'svelte-store'],
|
28 | 30 | ['run-time-svelte-motion', 'svelte-motion'],
|
|
44 | 46 | if (!hash) return;
|
45 | 47 |
|
46 | 48 | for (const [old_id, new_id] of mappings) {
|
47 |
| - if (hash.startsWith(old_id)) return `/docs/svelte/${new_id}`; |
| 49 | + if (hash === old_id) return `/docs/svelte/${new_id}`; |
48 | 50 | }
|
49 | 51 | }
|
50 | 52 |
|
|
0 commit comments