mirror of
https://github.com/SrIzan10/starlight-typedoc.git
synced 2026-05-01 11:05:15 +00:00
docs: add og image
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import starlight from '@astrojs/starlight'
|
||||
import { defineConfig } from 'astro/config'
|
||||
|
||||
const site =
|
||||
process.env['VERCEL_ENV'] !== 'production' && process.env['VERCEL_URL']
|
||||
? `https://${process.env['VERCEL_URL']}`
|
||||
: 'https://starlight-typedoc.vercel.app/'
|
||||
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
starlight({
|
||||
@@ -8,6 +13,19 @@ export default defineConfig({
|
||||
editLink: {
|
||||
baseUrl: 'https://github.com/HiDeoo/starlight-typedoc/edit/main/docs/',
|
||||
},
|
||||
head: [
|
||||
{
|
||||
tag: 'meta',
|
||||
attrs: { property: 'og:image', content: new URL('og.jpg', site).href },
|
||||
},
|
||||
{
|
||||
tag: 'meta',
|
||||
attrs: {
|
||||
property: 'og:image:alt',
|
||||
content: 'Starlight plugin to generate documentation from TypeScript using TypeDoc.',
|
||||
},
|
||||
},
|
||||
],
|
||||
sidebar: [
|
||||
{
|
||||
label: 'Start Here',
|
||||
@@ -39,4 +57,5 @@ export default defineConfig({
|
||||
title: 'Starlight TypeDoc',
|
||||
}),
|
||||
],
|
||||
site,
|
||||
})
|
||||
|
||||
BIN
docs/public/og.jpg
Normal file
BIN
docs/public/og.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@@ -2,6 +2,11 @@ import starlight from '@astrojs/starlight'
|
||||
import { defineConfig } from 'astro/config'
|
||||
import starlightTypeDoc, { typeDocSidebarGroup } from 'starlight-typedoc'
|
||||
|
||||
const site =
|
||||
process.env['VERCEL_ENV'] !== 'production' && process.env['VERCEL_URL']
|
||||
? `https://${process.env['VERCEL_URL']}`
|
||||
: 'https://starlight-typedoc-example.vercel.app/'
|
||||
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
starlight({
|
||||
@@ -9,6 +14,19 @@ export default defineConfig({
|
||||
editLink: {
|
||||
baseUrl: 'https://github.com/HiDeoo/starlight-typedoc/edit/main/example/',
|
||||
},
|
||||
head: [
|
||||
{
|
||||
tag: 'meta',
|
||||
attrs: { property: 'og:image', content: new URL('og.jpg', site).href },
|
||||
},
|
||||
{
|
||||
tag: 'meta',
|
||||
attrs: {
|
||||
property: 'og:image:alt',
|
||||
content: 'Starlight plugin to generate documentation from TypeScript using TypeDoc.',
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
starlightTypeDoc({
|
||||
entryPoints: ['../fixtures/basics/src/index.ts'],
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="90">📚</text></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 111 B |
BIN
example/public/og.jpg
Normal file
BIN
example/public/og.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user