diff --git a/docs/src/components/HeadSEO.astro b/docs/src/components/HeadSEO.astro index 5553eb2d0..be6b016c7 100644 --- a/docs/src/components/HeadSEO.astro +++ b/docs/src/components/HeadSEO.astro @@ -5,8 +5,10 @@ export interface Props { site: any, canonicalURL: URL | string, }; -const { content = {}, canonicalURL } = Astro.props; -const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title; +const { + content = {}, + canonicalURL, + } = Astro.props; const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src; const canonicalImageSrc = new URL(imageSrc, Astro.site); const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; @@ -15,7 +17,7 @@ const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; - + @@ -27,7 +29,7 @@ const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; - + diff --git a/docs/src/layouts/MainLayout.astro b/docs/src/layouts/MainLayout.astro index bfee61cd9..45eab6d0f 100644 --- a/docs/src/layouts/MainLayout.astro +++ b/docs/src/layouts/MainLayout.astro @@ -12,13 +12,14 @@ const { content = {} } = Astro.props; const currentPage = Astro.request.url.pathname; const currentFile = `src/pages${currentPage.replace(/\/$/, "")}.md`; const githubEditUrl = `https://github.com/snowpackjs/astro/blob/main/docs/${currentFile}`; +const formatTitle = (content, SITE) => content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title; ---