generated from moeyua/astro-theme-typography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
87 lines (86 loc) · 2.25 KB
/
astro.config.ts
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
import mdx from '@astrojs/mdx'
import sitemap from '@astrojs/sitemap'
import swup from '@swup/astro'
import robotsTxt from 'astro-robots-txt'
import { defineConfig } from 'astro/config'
import astroExpressiveCode from 'astro-expressive-code';
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections'
import remarkToc from 'remark-toc'
import remarkCollapse from 'remark-collapse'
import { remarkAlert } from 'remark-github-blockquote-alert'
import remarkMath from 'remark-math'
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypeKatex from 'rehype-katex'
import rehypeExternalLinks from 'rehype-external-links'
import UnoCSS from 'unocss/astro'
import { themeConfig } from './src/.config'
// https://astro.build/config
export default defineConfig({
site: themeConfig.site.website,
prefetch: true,
base: '/',
markdown: {
remarkPlugins: [
remarkToc,
[
remarkCollapse,
{
test: "Table of contents",
},
],
remarkAlert,
remarkMath,
],
rehypePlugins: [
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{
behavior: 'wrap',
},
],
rehypeKatex,
[
rehypeExternalLinks,
{
target: '_blank',
rel: 'noopener noreferrer'
},
],
],
},
integrations: [
astroExpressiveCode({
themes: ['catppuccin-latte', 'catppuccin-macchiato'],
defaultProps: {
// Enable word wrap by default
wrap: true,
// Disable wrapped line indentation for terminal languages
overridesByLang: {
'bash,ps,sh': { preserveIndent: false },
},
showLineNumbers: true,
},
plugins: [
pluginLineNumbers(),
pluginCollapsibleSections()
],
}),
UnoCSS({ injectReset: true }),
mdx({}),
robotsTxt(),
sitemap(),
swup({
theme: false,
animationClass: 'transition-swup-',
cache: true,
preload: true,
accessibility: true,
smoothScrolling: true,
updateHead: true,
updateBodyClass: true,
}),
],
})