diff --git a/astro.config.ts b/astro.config.ts index 59a4b53a6..0af0c1880 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -15,6 +15,7 @@ import { remarkHeadings } from './docs/plugins/remark-headings' import { colorTheme } from './docs/utils/shiki-theme' let dirname = fileURLToPath(path.dirname(import.meta.url)) +let site = 'https://perfectionist.dev' export default defineConfig({ markdown: { @@ -40,22 +41,6 @@ export default defineConfig({ ], remarkPlugins: [remarkSectionize, remarkHeadings], }, - vite: { - css: { - lightningcss: { - targets: browserslistToTargets( - browserslist(null, { - config: path.join(dirname, './.browserslistrc'), - }), - ), - }, - transformer: 'lightningcss', - }, - plugins: [ - // @ts-ignore - svelteSvg(), - ], - }, integrations: [ compress({ JavaScript: true, @@ -70,9 +55,27 @@ export default defineConfig({ discloseVersion: false, }, }), - sitemap(), + sitemap({ + filter: page => !new RegExp(`^${site}/guide$`).test(page), + }), mdx(), ], + vite: { + css: { + lightningcss: { + targets: browserslistToTargets( + browserslist(null, { + config: path.join(dirname, './.browserslistrc'), + }), + ), + }, + transformer: 'lightningcss', + }, + plugins: [ + // @ts-ignore + svelteSvg(), + ], + }, prefetch: { defaultStrategy: 'viewport', prefetchAll: true, @@ -91,6 +94,6 @@ export default defineConfig({ }, srcDir: path.join(dirname, './docs'), root: path.join(dirname, './docs'), - site: 'https://perfectionist.dev', compressHTML: true, + site, }) diff --git a/docs/components/Button.svelte b/docs/components/Button.svelte index bf4745e32..65cc20b68 100644 --- a/docs/components/Button.svelte +++ b/docs/components/Button.svelte @@ -8,6 +8,7 @@ class:button-primary={color === 'primary'} on:click={onClick} class="button" + type="button" > diff --git a/docs/components/CodeTabs.svelte b/docs/components/CodeTabs.svelte index 6356b8c5b..5d996b859 100644 --- a/docs/components/CodeTabs.svelte +++ b/docs/components/CodeTabs.svelte @@ -47,6 +47,7 @@ }} class:active-tab={mounted && $codeSettings[type] === codeValue.value} aria-selected={$codeSettings[type] === codeValue.value} + type="button" class="tab" role="tab" > @@ -74,6 +75,7 @@ class:copy-button-copied={copied} class="copy-button" on:click={copyCode} + type="button" > {#if copied} diff --git a/docs/components/Container.astro b/docs/components/Container.astro index 404e9114d..e1b24aff0 100644 --- a/docs/components/Container.astro +++ b/docs/components/Container.astro @@ -10,7 +10,16 @@ let { class: className, tag = 'div', size = 'm', ...rest } = Astro.props let Tag = tag --- - + diff --git a/docs/components/Header.astro b/docs/components/Header.astro index b47de9e20..dd0a77297 100644 --- a/docs/components/Header.astro +++ b/docs/components/Header.astro @@ -14,7 +14,12 @@ let { border = false } = Astro.props