-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
56 lines (53 loc) · 1.52 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
import "dotenv/config";
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import compress from "astro-compress";
import preact from "@astrojs/preact";
import tailwind from "@astrojs/tailwind";
import directive from "remark-directive";
import github from "remark-github";
import breaks from "remark-breaks";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import { remarkHeadingId } from "@effector/remark-heading-id";
import { admonitions } from "./plugins/admonitions";
import { remarkFallbackLang } from "./plugins/remark-fallback-lang";
// https://astro.build/config
export default defineConfig({
site: process.env.NODE_ENV === "development" ? "http://localhost:4321" : `https://effector.dev`,
integrations: [
tailwind({ applyBaseStyles: false }),
preact({ compat: true }),
mdx({ extendMarkdownConfig: true }),
process.env.COMPRESS !== "false" && compress(),
],
prefetch: true,
base: "/",
build: {
assets: "assets",
},
scopedStyleStrategy: "where",
markdown: {
syntaxHighlight: "prism",
remarkPlugins: [directive, admonitions, github, remarkHeadingId],
rehypePlugins: [
[
rehypeAutolinkHeadings,
{
behavior: "prepend",
properties: { class: "href" },
},
],
],
},
vite: {
server: {
proxy: {
"/_pagefind": {
target: "http://127.0.0.1:1414",
rewrite: (path) => path.replace(/^\/dist/, ""),
},
},
},
},
devToolbar: { enabled: false },
});