fix(site): renderer new link format (#8787)

* adapt

* Uncomment

* Push

* Bump site-kit
pull/8790/head
Puru Vijay 2 years ago committed by GitHub
parent c808ebf2c4
commit 3c8a07136a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -328,7 +328,7 @@ The `<svelte:options>` element provides a place to specify per-component compile
## `<svelte:fragment>` ## `<svelte:fragment>`
The `<svelte:fragment>` element allows you to place content in a [named slot](/docs/special-elements#slot-name-name) without wrapping it in a container DOM element. This keeps the flow layout of your document intact. The `<svelte:fragment>` element allows you to place content in a [named slot](/docs/special-elements#slot-slot-name-name) without wrapping it in a container DOM element. This keeps the flow layout of your document intact.
```svelte ```svelte
<!-- Widget.svelte --> <!-- Widget.svelte -->

@ -4,9 +4,9 @@ title: 'svelte/store'
The `svelte/store` module exports functions for creating [readable](/docs/svelte-store#readable), [writable](/docs/svelte-store#writable) and [derived](/docs/svelte-store#derived) stores. The `svelte/store` module exports functions for creating [readable](/docs/svelte-store#readable), [writable](/docs/svelte-store#writable) and [derived](/docs/svelte-store#derived) stores.
Keep in mind that you don't _have_ to use these functions to enjoy the [reactive `$store` syntax](/docs/svelte-components#4-prefix-stores-with-$-to-access-their-values) in your components. Any object that correctly implements `.subscribe`, unsubscribe, and (optionally) `.set` is a valid store, and will work both with the special syntax, and with Svelte's built-in [`derived` stores](/docs/svelte-store#derived). Keep in mind that you don't _have_ to use these functions to enjoy the [reactive `$store` syntax](/docs/svelte-components#script-4-prefix-stores-with-$-to-access-their-values) in your components. Any object that correctly implements `.subscribe`, unsubscribe, and (optionally) `.set` is a valid store, and will work both with the special syntax, and with Svelte's built-in [`derived` stores](/docs/svelte-store#derived).
This makes it possible to wrap almost any other reactive state handling library for use in Svelte. Read more about the [store contract](/docs/svelte-components#4-prefix-stores-with-$-to-access-their-values) to see what a correct implementation looks like. This makes it possible to wrap almost any other reactive state handling library for use in Svelte. Read more about the [store contract](/docs/svelte-components#script-4-prefix-stores-with-$-to-access-their-values) to see what a correct implementation looks like.
## `writable` ## `writable`

@ -29,7 +29,7 @@ const result = compile(source, {
}); });
``` ```
Refer to [CompileOptions](#type-compileoptions) for all the available options. Refer to [CompileOptions](#types-compileoptions) for all the available options.
The returned `result` object contains the code for your component, along with useful bits of metadata. The returned `result` object contains the code for your component, along with useful bits of metadata.
@ -47,7 +47,7 @@ import { compile } from 'svelte/compiler';
const { js, css, ast, warnings, vars, stats } = compile(source); const { js, css, ast, warnings, vars, stats } = compile(source);
``` ```
Refer to [CompileResult](#type-compileresult) for a full description of the compile result. Refer to [CompileResult](#types-compileresult) for a full description of the compile result.
## parse ## parse

@ -182,8 +182,8 @@ importers:
specifier: ^1.20.4 specifier: ^1.20.4
version: 1.20.4(svelte@packages+svelte)(vite@4.3.9) version: 1.20.4(svelte@packages+svelte)(vite@4.3.9)
'@sveltejs/site-kit': '@sveltejs/site-kit':
specifier: 6.0.0-next.11 specifier: 6.0.0-next.14
version: 6.0.0-next.11(@sveltejs/kit@1.20.4)(svelte@packages+svelte) version: 6.0.0-next.14(@sveltejs/kit@1.20.4)(svelte@packages+svelte)
'@sveltejs/vite-plugin-svelte': '@sveltejs/vite-plugin-svelte':
specifier: ^2.4.1 specifier: ^2.4.1
version: 2.4.1(svelte@packages+svelte)(vite@4.3.9) version: 2.4.1(svelte@packages+svelte)(vite@4.3.9)
@ -1822,8 +1822,8 @@ packages:
svelte-local-storage-store: 0.4.0(svelte@packages+svelte) svelte-local-storage-store: 0.4.0(svelte@packages+svelte)
dev: false dev: false
/@sveltejs/site-kit@6.0.0-next.11(@sveltejs/kit@1.20.4)(svelte@packages+svelte): /@sveltejs/site-kit@6.0.0-next.14(@sveltejs/kit@1.20.4)(svelte@packages+svelte):
resolution: {integrity: sha512-v7K02vXgjotwvCbFEKHUcNK8/DOOVJ6KAGd9R7g1D93uVkAlcdn06D7ki8x17CskP5sl9FQIGV/RUuxDA459FA==} resolution: {integrity: sha512-KAQlX47fAL1LC1OCC/mQFDmSZyfX7zEK6/B1BEF6i265SN1OBwE1ZG4yrlQa5EaUVz8MIyjcvLqbikiqAWesTA==}
peerDependencies: peerDependencies:
'@sveltejs/kit': ^1.0.0 '@sveltejs/kit': ^1.0.0
svelte: ^3.54.0 || ^4.0.0-next.1 || ^4.0.0 svelte: ^3.54.0 || ^4.0.0-next.1 || ^4.0.0

@ -30,7 +30,7 @@
"@resvg/resvg-js": "^2.4.1", "@resvg/resvg-js": "^2.4.1",
"@sveltejs/adapter-vercel": "^3.0.1", "@sveltejs/adapter-vercel": "^3.0.1",
"@sveltejs/kit": "^1.20.4", "@sveltejs/kit": "^1.20.4",
"@sveltejs/site-kit": "6.0.0-next.11", "@sveltejs/site-kit": "6.0.0-next.14",
"@sveltejs/vite-plugin-svelte": "^2.4.1", "@sveltejs/vite-plugin-svelte": "^2.4.1",
"@types/marked": "^5.0.0", "@types/marked": "^5.0.0",
"@types/node": "^20.3.1", "@types/node": "^20.3.1",

@ -14,7 +14,7 @@ export const render_content = (filename, body) =>
resolveTypeLinks: (module_name, type_name) => { resolveTypeLinks: (module_name, type_name) => {
return { return {
page: `/docs/${slugify(module_name)}`, page: `/docs/${slugify(module_name)}`,
slug: `type-${slugify(type_name)}` slug: `types-${slugify(type_name)}`
}; };
}, },

@ -145,12 +145,12 @@
// component-format- // component-format-
[/component-format-(script|style|script-context-module)$/i, 'svelte-components#$1'], [/component-format-(script|style|script-context-module)$/i, 'svelte-components#$1'],
[/component-format-(?:script)(?:-?(.*))$/i, 'svelte-components#$1'], [/component-format-(script)(?:-?(.*))$/i, 'svelte-components#$1-$2'],
// template-syntax // template-syntax
[/template-syntax-((?:element|component)-directives)-?(.*)/i, '$1#$2'], [/template-syntax-((?:element|component)-directives)-?(.*)/i, '$1#$2'],
[/template-syntax-slot$/i, 'special-elements#slot'], [/template-syntax-slot$/i, 'special-elements#slot'],
[/template-syntax-(?:slot)-?(.*)/i, 'special-elements#$1'], [/template-syntax-(slot)-?(.*)/i, 'special-elements#$1-$2'],
[/template-syntax-(if|each|await|key)$/i, 'logic-blocks#$1'], [/template-syntax-(if|each|await|key)$/i, 'logic-blocks#$1'],
[/template-syntax-(const|debug|html)$/i, 'special-tags#$1'], [/template-syntax-(const|debug|html)$/i, 'special-tags#$1'],
[/template-syntax-(tags|attributes-and-props|text-expressions|comments)$/i, 'basic-markup#$1'], [/template-syntax-(tags|attributes-and-props|text-expressions|comments)$/i, 'basic-markup#$1'],
@ -196,7 +196,7 @@
return new_ids; return new_ids;
} }
function getURlToRedirectTo() { function get_url_to_redirect_to() {
const hash = $page.url.hash.replace(/^#/i, ''); const hash = $page.url.hash.replace(/^#/i, '');
if (!hash) return '/docs/introduction'; if (!hash) return '/docs/introduction';
@ -211,6 +211,6 @@
onMount(() => { onMount(() => {
console.log(get_old_new_ids_map()); console.log(get_old_new_ids_map());
goto(getURlToRedirectTo(), { replaceState: true }); goto(get_url_to_redirect_to(), { replaceState: true });
}); });
</script> </script>

Loading…
Cancel
Save