-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathastro.config.mjs
68 lines (67 loc) · 2.18 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
61
62
63
64
65
66
67
68
import path from "path";
import { fileURLToPath } from "url";
import mdx from "@astrojs/mdx";
import partytown from "@astrojs/partytown";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";
import { SITE } from "./src/config.mjs";
import { remarkReadingTime } from "./src/utils/frontmatter.js";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
import autolinkHeadings from "rehype-autolink-headings";
import rehypeSlug from "rehype-slug";
import { tsconfigPaths } from "vite-plugin-lib";
import { autolinkConfig } from "./plugins/rehype-autolink-config";
// https://astro.build/config
export default defineConfig({
// Astro uses this full URL to generate your sitemap and canonical URLs in your final build
site: SITE.origin,
base: SITE.basePathname,
trailingSlash: SITE.trailingSlash ? "always" : "never",
output: "static",
redirects: {
// redirect since it was shared via linkedin under an this old address which cannot be updated
"/post/berlin_summit_2023_review": "/post/berlin-summit-2023-review",
// redirect since the associated tweet points at the old adress
"/post/product_engineers": "/post/product-engineers",
},
integrations: [
tailwind({
config: {
applyBaseStyles: false,
},
}),
sitemap(),
mdx() /* Disable this integration if you don't use Google Analytics (or other external script). */,
partytown({
config: {
forward: ["dataLayer.push"],
},
}),
react(),
],
markdown: {
remarkPlugins: [remarkReadingTime],
rehypePlugins: [rehypeSlug, [autolinkHeadings, autolinkConfig]],
extendDefaultPlugins: true,
shikiConfig: {
// Choose from Shiki's built-in themes (or add your own)
// https://github.com/shikijs/shiki/blob/main/docs/themes.md
theme: "rose-pine",
// Enable word wrap to prevent horizontal scrolling
wrap: false,
},
},
vite: {
resolve: {
alias: {
"~": path.resolve(__dirname, "./src"),
},
},
optimizeDeps: {
exclude: ["limax"],
},
plugins: [tsconfigPaths({ verbose: true })],
},
});