-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
91 lines (87 loc) · 2.51 KB
/
astro.config.mjs
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// @ts-check
import fs from 'fs';
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import tailwindcss from '@tailwindcss/vite';
import rehypeMermaid from 'rehype-mermaid';
import starlightAutoSidebar from 'starlight-auto-sidebar';
// https://astro.build/config
export default defineConfig({
site: 'https://docs.txpipe.io',
trailingSlash: 'never',
integrations: [
starlight({
plugins: [starlightAutoSidebar()],
customCss: [
'@fontsource-variable/inter',
'@fontsource-variable/roboto-mono',
'./src/styles/global.css',
],
title: 'TxPipe Docs',
lastUpdated: true,
logo: {
src: './src/assets/txpipe-logo.webp',
},
social: {
github: 'https://github.com/txpipe/docs',
},
sidebar: [
{
label: 'Balius',
autogenerate: { directory: 'balius', collapsed: true },
},
{
label: 'Boros',
autogenerate: { directory: 'boros', collapsed: true },
},
{
label: 'Dolos',
autogenerate: { directory: 'dolos', collapsed: true },
},
{
label: 'Oura/v1',
autogenerate: { directory: 'oura/v1', collapsed: true },
},
{
label: 'Oura/v2',
autogenerate: { directory: 'oura/v2', collapsed: true },
},
{
label: 'Tx3',
autogenerate: { directory: 'tx3', collapsed: true },
},
],
components: {
Sidebar: './src/components/overrides/Sidebar.astro',
Header: './src/components/overrides/Header.astro',
SiteTitle: './src/components/overrides/SiteTitle.astro',
Search: './src/components/overrides/Search.astro',
PageFrame: './src/components/overrides/PageFrame.astro',
ContentPanel: './src/components/overrides/ContentPanel.astro',
MobileMenuFooter: './src/components/overrides/MobileMenuFooter.astro',
Footer: './src/components/overrides/Footer.astro',
},
expressiveCode: {
themes: ['starlight-dark'],
useStarlightDarkModeSwitch: false,
shiki: {
langs: [
JSON.parse(fs.readFileSync('./langs/tx3.tmLanguage.json', 'utf-8')),
],
},
},
routeMiddleware: './src/routeData.ts',
}),
],
vite: {
plugins: [tailwindcss()],
},
markdown: {
rehypePlugins: [
[rehypeMermaid, { strategy: 'img-svg', dark: true }],
],
},
experimental: {
svg: true,
},
});