Repository navigation
Expand file tree
/
Copy pathastro.config.mjs
More file actions
54 lines (52 loc) · 2.16 KB
/
Copy pathastro.config.mjs
File metadata and controls
54 lines (52 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// @ts-check
import { readFileSync } from 'node:fs';
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { ExpressiveCodeTheme } from '@astrojs/starlight/expressive-code';
import { sidebar } from './src/sidebar.mjs';
// Code blocks use the same syntax themes as the CLI and editor (patch-it-brand/terminal/).
const theme = (file) => ExpressiveCodeTheme.fromJSONString(readFileSync(new URL(file, import.meta.url), 'utf-8'));
export default defineConfig({
site: 'https://docs.patch-it.dev',
integrations: [
starlight({
title: 'patch-it docs',
description: 'Third-party API changes, fixed as pull requests in your own repo.',
logo: {
dark: './src/assets/wordmark-plain-on-dark.svg',
light: './src/assets/wordmark-plain-on-light.svg',
alt: 'patch-it',
replacesTitle: true,
},
favicon: '/favicon.svg',
head: [
{ tag: 'link', attrs: { rel: 'icon', href: '/favicon.ico', sizes: '48x48' } },
{ tag: 'link', attrs: { rel: 'apple-touch-icon', href: '/apple-touch-icon.png' } },
{ tag: 'link', attrs: { rel: 'manifest', href: '/site.webmanifest' } },
{ tag: 'meta', attrs: { name: 'theme-color', content: '#1E1E24' } },
{ tag: 'meta', attrs: { property: 'og:image', content: 'https://docs.patch-it.dev/og.png' } },
],
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/patch-it-dev' },
],
editLink: { baseUrl: 'https://github.com/patch-it-dev/patch-it-docs/edit/main/' },
lastUpdated: true,
expressiveCode: {
themes: [theme('./src/themes/patch-it-dark.json'), theme('./src/themes/patch-it-light.json')],
styleOverrides: {
borderRadius: '10px',
codeFontFamily: "'IBM Plex Mono', ui-monospace, monospace",
uiFontFamily: "'IBM Plex Sans', system-ui, sans-serif",
},
},
customCss: [
'@fontsource/ibm-plex-sans/400.css',
'@fontsource/ibm-plex-sans/600.css',
'@fontsource/ibm-plex-mono/400.css',
'@fontsource/ibm-plex-mono/500.css',
'./src/styles/custom.css',
],
sidebar,
}),
],
});