From 2e37d39fda984b9f401f54bd9e164e3fb90337a8 Mon Sep 17 00:00:00 2001 From: MinamiFunakoshiTR Date: Tue, 11 Mar 2025 12:12:23 -0700 Subject: [PATCH] updates seo --- src/components/BodyText/BodyText.mdx | 2 +- src/components/SEO/SEO.mdx | 77 ++++++++++++ src/components/SEO/SEO.stories.svelte | 48 ++------ src/components/SEO/SEO.svelte | 121 +++++++++---------- src/components/SEO/stories/docs/archieML.md | 36 ------ src/components/SEO/stories/docs/component.md | 26 ---- 6 files changed, 143 insertions(+), 167 deletions(-) create mode 100644 src/components/SEO/SEO.mdx delete mode 100644 src/components/SEO/stories/docs/archieML.md delete mode 100644 src/components/SEO/stories/docs/component.md diff --git a/src/components/BodyText/BodyText.mdx b/src/components/BodyText/BodyText.mdx index 9cd25312..1395c3a2 100644 --- a/src/components/BodyText/BodyText.mdx +++ b/src/components/BodyText/BodyText.mdx @@ -33,7 +33,7 @@ Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatbal With the graphics kit, you'll likely get your text value from an ArchieML doc. ```yaml -# Archie ML doc +# ArchieML doc [blocks] type: text diff --git a/src/components/SEO/SEO.mdx b/src/components/SEO/SEO.mdx new file mode 100644 index 00000000..44cd57bd --- /dev/null +++ b/src/components/SEO/SEO.mdx @@ -0,0 +1,77 @@ +import { Meta } from '@storybook/blocks'; + +import * as SEOStories from './SEO.stories.svelte'; + + + +# SEO + +The `SEO` component adds essential metadata to pages. + +```svelte + + + +``` + +## Using with ArchieML docs + +With the Graphics Kit, you'll likely get your text values from an ArchieML doc... + +```yaml +# ArchieML doc +slug: ROOT-SLUG/WILD +seoTitle: Page title for search +seoDescription: Page description for search +shareTitle: Page title for social media +shareDescription: Page description for social media +shareImgPath: images/reuters-graphics.jpg +shareImgAlt: Alt text for share image. +``` + +... which you'll pass to the `SEO` component. + +```svelte + + + +``` + +> **Note:** For _reasons_, we can't document the value of `VITE_BASE_URL` below. It's `import` + `.meta.env.BASE_URL` (concatenate all that) in the Graphics Kit and other Vite-based rigs. diff --git a/src/components/SEO/SEO.stories.svelte b/src/components/SEO/SEO.stories.svelte index e09205b5..d8fba939 100644 --- a/src/components/SEO/SEO.stories.svelte +++ b/src/components/SEO/SEO.stories.svelte @@ -1,49 +1,21 @@ - - - - - - + }} +> + View page source to see the SEO metadata. + diff --git a/src/components/SEO/SEO.svelte b/src/components/SEO/SEO.svelte index c18ae2b8..6afeb156 100644 --- a/src/components/SEO/SEO.svelte +++ b/src/components/SEO/SEO.svelte @@ -1,85 +1,72 @@ - - -``` - -> **Note:** For _reasons_, we can't document the value of `VITE_BASE_URL` below. It's `import` + `.meta.env.BASE_URL` (concatenate all that) in the Graphics Kit and other Vite-based rigs. - diff --git a/src/components/SEO/stories/docs/component.md b/src/components/SEO/stories/docs/component.md deleted file mode 100644 index 0b5c0aa2..00000000 --- a/src/components/SEO/stories/docs/component.md +++ /dev/null @@ -1,26 +0,0 @@ -The `SEO` component adds essential metadata to published pages. - -```svelte - - - -```