diff options
author | 2021-07-22 19:08:45 -0500 | |
---|---|---|
committer | 2021-07-22 19:08:45 -0500 | |
commit | 7b600d597bb2c2f95c8faeedc47b4d4b27c397a7 (patch) | |
tree | 6a6d6a19c7e616fa628e4e5998793d637d7b9d74 /docs/src/components/MetaData.astro | |
parent | debbc18708bfe6ccd6c077b9148f1e08093671df (diff) | |
download | astro-7b600d597bb2c2f95c8faeedc47b4d4b27c397a7.tar.gz astro-7b600d597bb2c2f95c8faeedc47b4d4b27c397a7.tar.zst astro-7b600d597bb2c2f95c8faeedc47b4d4b27c397a7.zip |
Move `site` to a prop instead of directly importing from within the component. (#803)
Diffstat (limited to 'docs/src/components/MetaData.astro')
-rw-r--r-- | docs/src/components/MetaData.astro | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/src/components/MetaData.astro b/docs/src/components/MetaData.astro index ec62749b0..ce5a9ff77 100644 --- a/docs/src/components/MetaData.astro +++ b/docs/src/components/MetaData.astro @@ -1,6 +1,10 @@ --- -import { site } from '../config.ts'; -const { content = {}, canonicalURL } = Astro.props; +export interface Props { + content: any, + site: any, + canonicalURL: URL | string, +}; +const { content = {}, site, canonicalURL } = Astro.props; const formattedContentTitle = content.title ? `${content.title} 🚀 ${site.title}` : site.title; const imageSrc = content?.image?.src ?? site.image.src; const canonicalImageSrc = new URL(imageSrc, Astro.site); |