Repository navigation
Expand file tree
/
Copy pathastro.config.ts
More file actions
95 lines (93 loc) · 2.31 KB
/
Copy pathastro.config.ts
File metadata and controls
95 lines (93 loc) · 2.31 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import { defineConfig } from "astro/config";
import type { AstroUserConfig } from "astro";
import starlight from "@astrojs/starlight";
import react from "@astrojs/react";
import { paraglideVitePlugin } from "@inlang/paraglide-js";
import mermaid from "astro-mermaid";
import md3Theme from "starlight-theme-md3";
import { sidebar } from "./src/config/sidebar";
import tailwindcss from "@tailwindcss/vite";
type AstroPluginOption = NonNullable<NonNullable<AstroUserConfig["vite"]>["plugins"]>[number];
export default defineConfig({
site: "https://libnyanpasu.github.io",
output: "static",
integrations: [
mermaid(),
starlight({
title: "Clash Nyanpasu",
favicon: "/favicon.ico",
logo: {
src: "./src/assets/logo.png",
alt: "Clash Nyanpasu",
},
social: [
{
icon: "telegram",
label: "Telegram",
href: "https://t.me/keikolog",
},
{
icon: "github",
label: "GitHub",
href: "https://github.com/libnyanpasu",
},
],
editLink: {
baseUrl: "https://github.com/libnyanpasu/libnyanpasu.github.io/edit/main/",
},
plugins: [
md3Theme({
seed: "#1867C0",
}),
],
customCss: ["./src/styles/tailwind.css"],
defaultLocale: "root",
locales: {
root: {
label: "English",
lang: "en",
},
"zh-cn": {
label: "简体中文",
lang: "zh-CN",
},
},
sidebar,
components: {
Head: "./src/components/overrides/head.astro",
},
lastUpdated: true,
credits: true,
}),
react(),
],
markdown: {
shikiConfig: { theme: "github-dark" },
},
vite: {
resolve: {
alias: {
"@/*": "./src/*",
},
},
plugins: [
tailwindcss(),
paraglideVitePlugin({
project: "./project.inlang",
outdir: "./src/paraglide",
strategy: ["url", "baseLocale"],
urlPatterns: [
{
pattern: "/:path(.*)?",
localized: [
["zh-cn", "/zh-cn/:path(.*)?"],
["en", "/:path(.*)?"],
],
},
],
emitPrettierIgnore: false,
includeEslintDisableComment: false,
}) as AstroPluginOption,
],
},
});