Skip to content

Commit 87a7276

Browse files
committed
docs: add og image
1 parent 93838fe commit 87a7276

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/astro.config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
import starlight from '@astrojs/starlight'
22
import { defineConfig } from 'astro/config'
33

4+
const site =
5+
process.env['VERCEL_ENV'] !== 'production' && process.env['VERCEL_URL']
6+
? `https://${process.env['VERCEL_URL']}`
7+
: 'https://starlight-links-validator.vercel.app/'
8+
49
export default defineConfig({
510
integrations: [
611
starlight({
712
customCss: ['./src/styles/custom.css'],
813
editLink: {
914
baseUrl: 'https://github.com/HiDeoo/starlight-links-validator/edit/main/docs/',
1015
},
16+
head: [
17+
{
18+
tag: 'meta',
19+
attrs: { property: 'og:image', content: new URL('og.jpg', site).href },
20+
},
21+
{ tag: 'meta', attrs: { property: 'og:image:alt', content: 'Starlight plugin to validate internal links.' } },
22+
],
1123
sidebar: [
1224
{
1325
label: 'Start Here',
@@ -29,4 +41,5 @@ export default defineConfig({
2941
title: 'Starlight Links Validator',
3042
}),
3143
],
44+
site,
3245
})

docs/public/og.jpg

44.1 KB
Loading

0 commit comments

Comments
 (0)