Skip to content

Commit

Permalink
docs: add 'og:image:alt' metadata (#2143)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored Jul 23, 2024
1 parent 703903b commit f71e6be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const NETLIFY_PREVIEW_SITE = process.env.CONTEXT !== 'production' && process.env

const site = NETLIFY_PREVIEW_SITE || 'https://starlight.astro.build/';
const ogUrl = new URL('og.jpg?v=1', site).href;
const ogImageAlt = 'Make your docs shine with Starlight';

export default defineConfig({
site,
Expand Down Expand Up @@ -58,6 +59,10 @@ export default defineConfig({
tag: 'meta',
attrs: { property: 'og:image', content: ogUrl },
},
{
tag: 'meta',
attrs: { property: 'og:image:alt', content: ogImageAlt },
},
],
customCss: process.env.NO_GRADIENTS ? [] : ['./src/assets/landing.css'],
locales,
Expand Down

0 comments on commit f71e6be

Please sign in to comment.