diff options
author | Valentin Popov <valentin@popov.link> | 2025-06-14 22:25:16 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2025-06-14 22:25:16 +0300 |
commit | a81117972d39df35574bbab809bb590abc874761 (patch) | |
tree | 41cb25172c7603d2ea0dc275f8d90c72d83bf5a1 /src/components/OpenGraph.astro | |
parent | 3d0f4857465e55815809719a4a4438e8a3cd16a0 (diff) | |
download | popov.link-a81117972d39df35574bbab809bb590abc874761.tar.xz popov.link-a81117972d39df35574bbab809bb590abc874761.zip |
feat: implement Open Graph image generation and enhance configuration
- Added ogImages integration to generate Open Graph images for blog posts.
- Updated configuration to include Open Graph settings and default preview image.
- Refactored Head component to utilize new preview property for Open Graph meta tags.
- Enhanced blog post schema to include preview image for structured data representation.
- Introduced utility functions for creating Open Graph images with dynamic content.
Diffstat (limited to 'src/components/OpenGraph.astro')
-rw-r--r-- | src/components/OpenGraph.astro | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/components/OpenGraph.astro b/src/components/OpenGraph.astro deleted file mode 100644 index 6ca1856..0000000 --- a/src/components/OpenGraph.astro +++ /dev/null @@ -1,26 +0,0 @@ ---- -import { config } from "../config"; - -type Props = { - readonly description: string; - readonly title: string; -}; - -const canonicalURL = new URL(Astro.url.pathname, Astro.site); -const { description, title } = Astro.props; - -const image = new URL(config.posts.defaultImage, Astro.site).toString(); ---- - -<!-- Open Graph --> -<meta property="og:type" content="website" /> -<meta property="og:title" content={title} /> -<meta property="og:description" content={description} /> -<meta property="og:image" content={image} /> -<meta property="og:url" content={canonicalURL} /> - -<!-- Twitter Cards --> -<meta name="twitter:card" content="summary_large_image" /> -<meta name="twitter:title" content={title} /> -<meta name="twitter:description" content={description} /> -<meta name="twitter:image" content={image} /> |