-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
54 lines (50 loc) · 1.2 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
import { execSync } from "node:child_process";
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import partytown from "@astrojs/partytown";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import playformCompress from "@playform/compress";
import { schema } from "./env.ts";
export default defineConfig({
site: "https://www.rayhanadev.com",
output: "static",
integrations: [
mdx(),
tailwind({
configFile: "./tailwind.config.ts",
applyBaseStyles: false,
}),
partytown({
config: {
forward: ["dataLayer.push"],
},
}),
sitemap(),
playformCompress({
Logger: 1,
}),
],
server: {
port: 3000,
},
prefetch: {
prefetchAll: true,
defaultStrategy: "viewport",
},
markdown: {
remarkPlugins: [
() => (_tree, file) => {
const filepath = file.history[0];
const result = execSync(
`git log -1 --pretty="format:%cI" "${filepath}"`
);
// @ts-ignore: added by astro but not exposed in the types
file.data.astro.frontmatter.lastModified = result.toString();
},
],
},
experimental: {
env: { schema },
},
});