forked from tnonate/thenewoil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
49 lines (38 loc) · 1.32 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
import * as fs from "fs/promises";
import * as path from "path";
import { fileURLToPath } from "url";
import { defineConfig } from "astro/config";
import type Config from "./typings/config";
const DIRNAME = path.dirname(fileURLToPath(import.meta.url));
const config = JSON.parse(
(await fs.readFile(path.resolve(DIRNAME, "config.json"))).toString()
) as Config;
// https://astro.build/config
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
import mdx from "@astrojs/mdx";
import compress from "astro-compress";
import robotsTxt from "astro-robots-txt";
import languagePlugin from "./plugins/astro-language";
// https://astro.build/config
export default defineConfig({
site: "https://thenewoil.org",
outDir: "./www",
integrations: [
tailwind({ config: { applyBaseStyles: false } }),
mdx(),
sitemap(),
robotsTxt({ sitemap: false, policy: [{disallow: "/", userAgent: "GPTBot"}, {disallow: "/", userAgent: "ia_archiver"}, {disallow: "/", userAgent: "User-Agent: Google-Extended"}] }),
compress({
css: { comments: false },
html: { removeComments: true },
js: false,
logger: 1,
}),
languagePlugin({
supportedLanguageCodes: config.languages.map((lang) => lang.code),
}),
],
});