diff --git a/examples/docs/src/components/HeadSEO.astro b/examples/docs/src/components/HeadSEO.astro index bd86b544d..298c17073 100644 --- a/examples/docs/src/components/HeadSEO.astro +++ b/examples/docs/src/components/HeadSEO.astro @@ -1,17 +1,17 @@ --- import { SITE, OPEN_GRAPH } from '../config'; export interface Props { - content: any; + frontmatter: any; site: any; canonicalURL: URL | string; } const canonicalURL = new URL(Astro.url.pathname, Astro.site); -const { content = {} } = Astro.props; -const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title; -const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src; +const { frontmatter = {} } = Astro.props; +const formattedContentTitle = frontmatter.title ? `${frontmatter.title} 🚀 ${SITE.title}` : SITE.title; +const imageSrc = frontmatter?.image?.src ?? OPEN_GRAPH.image.src; const canonicalImageSrc = new URL(imageSrc, Astro.site); -const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; +const imageAlt = frontmatter?.image?.alt ?? OPEN_GRAPH.image.alt; --- @@ -21,13 +21,13 @@ const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; - + @@ -37,7 +37,7 @@ const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; diff --git a/examples/docs/src/components/PageContent/PageContent.astro b/examples/docs/src/components/PageContent/PageContent.astro index 185b310c3..49a74ab70 100644 --- a/examples/docs/src/components/PageContent/PageContent.astro +++ b/examples/docs/src/components/PageContent/PageContent.astro @@ -2,8 +2,8 @@ import MoreMenu from '../RightSidebar/MoreMenu.astro'; import TableOfContents from '../RightSidebar/TableOfContents'; -const { content, headings, githubEditUrl } = Astro.props; -const title = content.title; +const { frontmatter, headings, githubEditUrl } = Astro.props; +const title = frontmatter.title; ---
diff --git a/examples/docs/src/components/RightSidebar/RightSidebar.astro b/examples/docs/src/components/RightSidebar/RightSidebar.astro index 0c01a2398..6144ed928 100644 --- a/examples/docs/src/components/RightSidebar/RightSidebar.astro +++ b/examples/docs/src/components/RightSidebar/RightSidebar.astro @@ -1,7 +1,7 @@ --- import TableOfContents from './TableOfContents'; import MoreMenu from './MoreMenu.astro'; -const { content, headings, githubEditUrl } = Astro.props; +const { headings, githubEditUrl } = Astro.props; ---