-
Notifications
You must be signed in to change notification settings - Fork 1
/
astro.config.ts
68 lines (67 loc) · 1.97 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
57
58
59
60
61
62
63
64
65
66
67
68
import { defineConfig, passthroughImageService } from "astro/config";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";
import remarkToc from "remark-toc";
import remarkCollapse from "remark-collapse";
import sitemap from "@astrojs/sitemap";
import { SITE } from "./src/config";
// https://astro.build/config
export default defineConfig({
// https://docs.astro.build/en/reference/configuration-reference/#site
// see https://config.tips/c/astro/dynamic-astro-site-value/
site: import.meta.env.DEV
? "http://localhost:4321"
: "https://emeraldjava.github.io/",
// See https://github.com/withastro/astro/issues/5512
// https://docs.astro.build/en/guides/environment-variables/
// https://vitejs.dev/guide/env-and-mode.html#env-files
//base: import.meta.env.DEV ? "." : "/emeraldjava-astro",
//base: import.meta.env.VITE_BASE,
integrations: [
tailwind({
applyBaseStyles: false,
}),
react(),
sitemap(),
],
image: {
// see https://docs.astro.build/en/reference/errors/missing-sharp/
service: passthroughImageService(),
},
markdown: {
remarkPlugins: [
remarkToc,
[
remarkCollapse,
{
test: "Table of contents",
},
],
],
shikiConfig: {
// For more themes, visit https://shiki.style/themes
themes: { light: "min-light", dark: "night-owl" },
wrap: true,
},
},
vite: {
// build: {
// rollupOptions: {
// output: {
// entryFileNames: '[name]-[hash].js',
// }
// }
// },
optimizeDeps: {
exclude: ["@resvg/resvg-js"],
},
},
scopedStyleStrategy: "where",
experimental: {
contentLayer: true,
},
// https://about.gitlab.com/blog/2022/10/24/publishing-an-astro-site-with-pages/
// GitLab Pages requires exposed files to be located in a folder called "public".
// So we're instructing Astro to put the static build output in a folder of that name.
outDir: "./dist",
});