-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
71 lines (66 loc) · 1.93 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
import { defineConfig } from "astro/config";
import { resolve } from "node:path";
import moment from "moment";
// Integrations
import htmlMinify from "./integrations/html-minify";
import icon from "astro-icon";
import mountAssets from "./integrations/mount-assets";
// Rehype plugins
import rehypeElementWrapper from "./rehype-plugins/element-wrapper";
import rehypeExternalLinks from "rehype-external-links";
import rehypeFigure from "./rehype-plugins/figure";
import rehypeKatex from "rehype-katex";
// Remark plugins
import remarkExtendedTable from "remark-extended-table";
import remarkMath from "remark-math";
import remarkSpoiler from "./remark-plugins/spoiler";
import remarkWordCounter from "./remark-plugins/word-counter";
// Vite plugins
import font from "vite-plugin-font";
import tailwindcss from "@tailwindcss/vite";
// https://astro.build/config
export default defineConfig({
integrations: [htmlMinify(), icon(), mountAssets()],
markdown: {
rehypePlugins: [
[
rehypeElementWrapper,
{ selector: "table", wrapper: "div.table-wrapper" },
],
[
rehypeExternalLinks,
{
protocols: ["http", "https", "mailto"],
rel: ["noopener", "noreferer"],
target: "_blank",
},
],
rehypeFigure,
[rehypeKatex, { output: "html" }],
],
remarkPlugins: [
remarkExtendedTable,
remarkMath,
remarkSpoiler,
remarkWordCounter,
],
},
redirects:
import.meta.env.PROD && process.env.SITE_REDIRECTS !== undefined
? JSON.parse(process.env.SITE_REDIRECTS)
: undefined,
site: "https://theteamfuture.github.io",
vite: {
define: {
__BUILD_TIME__: JSON.stringify(moment().format()),
},
plugins: [font.vite(), tailwindcss()],
resolve: {
alias: {
"@": resolve("src"),
"@avatars": resolve("src/assets/avatars"),
"@images": resolve("src/assets/images"),
},
},
},
});