-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
60 lines (59 loc) · 1.57 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
import { defineConfig } from "astro/config";
import partytown from "@astrojs/partytown";
import mdx from "@astrojs/mdx";
import remarkToc from "remark-toc";
import remarkMath from "remark-math";
import remarkLinkCard from "remark-link-card";
import { remarkAlert } from "remark-github-blockquote-alert";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex";
import rehypeRaw from "rehype-raw";
import rehypeExternalLinks from "rehype-external-links";
import icon from "astro-icon";
import agda from "./src/data/agda.tmLanguage.json";
// https://astro.build/config
export default defineConfig({
site: "https://wasabi315.github.io",
integrations: [
mdx(),
icon(),
// Ref: https://www.kevinzunigacuellar.com/blog/google-analytics-in-astro/
partytown({
config: {
forward: ["dataLayer.push"],
},
}),
],
markdown: {
shikiConfig: {
theme: "nord",
langs: [
"javascript",
"typescript",
"haskell",
"ocaml",
"rust",
agda,
"scheme",
"latex",
],
},
remarkPlugins: [
[remarkToc, { heading: "(table[ -]of[ -])?contents?|toc|目次" }],
remarkMath,
[remarkLinkCard, { shortenUrl: true }],
remarkAlert,
],
rehypePlugins: [
rehypeRaw,
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "append" }],
rehypeKatex,
[
rehypeExternalLinks,
{ target: "_blank", rel: ["noopener", "noreferrer"] },
],
],
},
});