Skip to content

Commit b4e8d1f

Browse files
committed
docs: add og image
1 parent f0b4c66 commit b4e8d1f

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

docs/astro.config.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,30 @@ import starlight from '@astrojs/starlight'
22
import { defineConfig } from 'astro/config'
33
import starlightChangelogs, { makeChangelogsSidebarLinks } from 'starlight-changelogs'
44

5+
const site =
6+
(process.env['CONTEXT'] === 'production' ? process.env['URL'] : process.env['DEPLOY_PRIME_URL']) ??
7+
'https://starlight-changelogs.netlify.app/'
8+
59
export default defineConfig({
610
integrations: [
711
starlight({
812
description: 'Starlight plugin to display changelogs alongside your project documentation.',
913
editLink: {
1014
baseUrl: 'https://github.com/HiDeoo/starlight-changelogs/edit/main/docs/',
1115
},
16+
head: [
17+
{
18+
tag: 'meta',
19+
attrs: { property: 'og:image', content: new URL('og.jpg', site).href },
20+
},
21+
{
22+
tag: 'meta',
23+
attrs: {
24+
property: 'og:image:alt',
25+
content: 'Starlight plugin to display changelogs alongside your project documentation.',
26+
},
27+
},
28+
],
1229
plugins: [starlightChangelogs()],
1330
sidebar: [
1431
{
@@ -69,6 +86,6 @@ export default defineConfig({
6986
title: 'Starlight Changelogs',
7087
}),
7188
],
72-
site: 'https://starlight-changelogs.netlify.app/',
89+
site,
7390
trailingSlash: 'always',
7491
})

docs/public/og.jpg

52.6 KB
Loading

0 commit comments

Comments
 (0)