-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathastro.config.mjs
More file actions
executable file
·61 lines (57 loc) · 1.61 KB
/
Copy pathastro.config.mjs
File metadata and controls
executable file
·61 lines (57 loc) · 1.61 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
import { unified } from "@astrojs/markdown-remark";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwindcss from "@tailwindcss/vite";
import AutoImport from "astro-auto-import";
import { defineConfig, fontProviders } from "astro/config";
import remarkCollapse from "remark-collapse";
import remarkToc from "remark-toc";
import sharp from "sharp";
import config from "./src/config/config.json";
// Brand fonts (must match the --font-* variables in src/styles/theme.css)
const fontsConfig = [
{
name: "Heebo",
cssVariable: "--font-primary",
provider: fontProviders.google(),
weights: [400, 600],
display: "swap",
fallbacks: ["sans-serif"],
},
{
name: "Signika",
cssVariable: "--font-secondary",
provider: fontProviders.google(),
weights: [500, 700],
display: "swap",
fallbacks: ["sans-serif"],
},
];
// https://astro.build/config
export default defineConfig({
site: config.site.base_url ? config.site.base_url : "http://examplesite.com",
base: config.site.base_path ? config.site.base_path : "/",
trailingSlash: config.site.trailing_slash ? "always" : "never",
image: { service: sharp() },
vite: { plugins: [tailwindcss()] },
fonts: fontsConfig,
integrations: [
sitemap(),
AutoImport({
imports: [
"@/shortcodes/Accordion.astro",
"@/shortcodes/Youtube.astro",
],
}),
mdx(),
],
markdown: {
processor: unified({
remarkPlugins: [
remarkToc,
[remarkCollapse, { test: "Table of contents" }],
],
}),
shikiConfig: { theme: "one-dark-pro", wrap: true },
},
});