diff options
author | 2023-06-06 11:21:19 -0500 | |
---|---|---|
committer | 2023-06-06 11:21:19 -0500 | |
commit | 5ed2a2f666707e579e18f2890ab89b7cc6f717c3 (patch) | |
tree | 9895d49bc5bd33a63ff0f2e94053e771a54b9dc4 /examples/docs/src/components/HeadSEO.astro | |
parent | d5a089810f8218f694ac56591648d36051708560 (diff) | |
download | astro-5ed2a2f666707e579e18f2890ab89b7cc6f717c3.tar.gz astro-5ed2a2f666707e579e18f2890ab89b7cc6f717c3.tar.zst astro-5ed2a2f666707e579e18f2890ab89b7cc6f717c3.zip |
chore: remove docs example (#7306)
Diffstat (limited to 'examples/docs/src/components/HeadSEO.astro')
-rw-r--r-- | examples/docs/src/components/HeadSEO.astro | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/examples/docs/src/components/HeadSEO.astro b/examples/docs/src/components/HeadSEO.astro deleted file mode 100644 index e8ac787d3..000000000 --- a/examples/docs/src/components/HeadSEO.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content'; -import { SITE, OPEN_GRAPH } from '../consts'; - -type Props = { canonicalUrl: URL } & CollectionEntry<'docs'>['data']; - -const { ogLocale, image, title, description, canonicalUrl } = Astro.props; -const formattedContentTitle = `${title} 🚀 ${SITE.title}`; -const imageSrc = image?.src ?? OPEN_GRAPH.image.src; -const canonicalImageSrc = new URL(imageSrc, Astro.site); -const imageAlt = image?.alt ?? OPEN_GRAPH.image.alt; ---- - -<!-- Page Metadata --> -<link rel="canonical" href={canonicalUrl} /> - -<!-- OpenGraph Tags --> -<meta property="og:title" content={formattedContentTitle} /> -<meta property="og:type" content="article" /> -<meta property="og:url" content={canonicalUrl} /> -<meta property="og:locale" content={ogLocale ?? SITE.defaultLanguage} /> -<meta property="og:image" content={canonicalImageSrc} /> -<meta property="og:image:alt" content={imageAlt} /> -<meta name="description" property="og:description" content={description ?? SITE.description} /> -<meta property="og:site_name" content={SITE.title} /> - -<!-- Twitter Tags --> -<meta name="twitter:card" content="summary_large_image" /> -<meta name="twitter:site" content={OPEN_GRAPH.twitter} /> -<meta name="twitter:title" content={formattedContentTitle} /> -<meta name="twitter:description" content={description ?? SITE.description} /> -<meta name="twitter:image" content={canonicalImageSrc} /> -<meta name="twitter:image:alt" content={imageAlt} /> - -<!-- - TODO: Add json+ld data, maybe https://schema.org/APIReference makes sense? - Docs: https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data - https://www.npmjs.com/package/schema-dts seems like a great resource for implementing this. - Even better, there's a React component that integrates with `schema-dts`: https://github.com/google/react-schemaorg ---> |