-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathastro.config.mjs
More file actions
80 lines (77 loc) · 1.95 KB
/
astro.config.mjs
File metadata and controls
80 lines (77 loc) · 1.95 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
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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import sitemap from '@astrojs/sitemap';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import { getSidebarConfig } from './src/data/sections.js';
import { siteConfig } from './src/data/site-config.js';
export default defineConfig({
site: siteConfig.site,
base: siteConfig.base,
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
},
image: {
service: {
entrypoint: 'astro/assets/services/sharp',
},
},
integrations: [
starlight({
title: siteConfig.title,
description: siteConfig.description,
defaultLocale: 'root',
locales: {
root: {
label: '简体中文',
lang: siteConfig.locale,
},
},
logo: {
src: './src/assets/bioinfo-logo.svg',
},
social: [
{
icon: 'github',
label: 'GitHub',
href: 'https://github.com/LessUp/wiki-bioinfo',
},
],
editLink: {
baseUrl: 'https://github.com/LessUp/wiki-bioinfo/tree/master/',
},
lastUpdated: true,
components: {
Head: './src/components/overrides/Head.astro',
},
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 4 },
expressiveCode: {
themes: ['github-dark', 'github-light'],
styleOverrides: {
borderRadius: '0.75rem',
borderColor: 'var(--sl-color-gray-5)',
},
},
customCss: [
'./src/styles/custom.css',
'./src/styles/katex.css',
],
head: [
{
tag: 'link',
attrs: {
rel: 'stylesheet',
href: 'https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css',
},
},
],
sidebar: getSidebarConfig(),
}),
sitemap({
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date(),
}),
],
});