-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathastro.config.mjs
More file actions
63 lines (50 loc) · 1.35 KB
/
Copy pathastro.config.mjs
File metadata and controls
63 lines (50 loc) · 1.35 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
import {defineConfig} from 'astro/config';
import sitemap from '@astrojs/sitemap';
import mdx from '@astrojs/mdx';
import {remarkWordCount} from './src/plugins/remark/wordcount.js';
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import partytown from '@astrojs/partytown';
import {remarkModifiedTime} from "./src/plugins/remark/modified-time.mjs";
import node from '@astrojs/node';
export default defineConfig({
site: 'https://terminal-blog.example.com',
base: '/',
trailingSlash: 'ignore',
redirects: {
// for the old routes still can be accessed
"/post/[...slug]": "/blog/[...slug]"
},
build: {
format: 'directory'
},
markdown: {
shikiConfig: {
theme: 'nord',
wrap: true
},
remarkPlugins: [remarkMath, remarkWordCount, remarkModifiedTime],
rehypePlugins: [rehypeKatex]
},
image: {
responsiveStyles: true,
layout: 'constrained',
},
i18n: {
locales: [
"en",
{
path: "zh-cn",
codes: ["zh-CN"]
}
],
defaultLocale: "en",
routing: {
prefixDefaultLocale: false
}
},
integrations: [sitemap(), mdx(), partytown()],
adapter: node({
mode: 'standalone'
})
});