-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathastro.config.mjs
More file actions
97 lines (95 loc) · 2.65 KB
/
astro.config.mjs
File metadata and controls
97 lines (95 loc) · 2.65 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import { defineConfig } from "astro/config";
import aws from "astro-sst";
import sitemap from "@astrojs/sitemap";
import tailwindcss from "@tailwindcss/vite";
import solidJs from "@astrojs/solid-js";
import pagefind from "./integrations/pagefind";
import { loadEnv } from "vite";
import icon from "astro-icon";
import mdx from "@astrojs/mdx";
const { IS_PUBLIC, PRE_BUILD, CUSTOM_DOMAIN } = loadEnv(
process.env.NODE_ENV,
process.cwd(),
"",
);
const is_public = IS_PUBLIC === "true";
const is_pre_build = PRE_BUILD === "true";
const siteUrl = CUSTOM_DOMAIN
? `https://${CUSTOM_DOMAIN}`
: "https://example.com";
// https://astro.build/config
export default defineConfig({
output: "static",
adapter: aws(),
integrations: [
sitemap(),
pagefind({
is_pre_build: is_pre_build,
is_public: is_public,
}),
solidJs(),
icon({
iconDir: "src/assets/icons",
}),
mdx(),
],
site: siteUrl,
cacheDir: "./cache",
compressHTML: true,
image: {
remotePatterns: [
{
protocol: "https",
},
],
service: {
entrypoint: "astro/assets/services/sharp",
config: {
limitInputPixels: false,
},
},
},
build: {
rollupOptions: {
external: ["/pagefind/pagefind.js"],
},
redirects: true,
},
vite: {
optimizeDeps: { exclude: ["auth:config"] },
plugins: [tailwindcss()],
},
redirects: {
"/lts": "/solutions/lts",
"/automotive-iot-and-edge-devices": "/projects/automotive-iot-edge",
"/cloud-computing-and-servers": "/projects/cloud-computing",
"/services/hands-on-training": "/services/training",
"/working-groups": "/",
"/projects": "/",
// '/core-technologies/[...slug]': "/",
"/core-technologies/virtualization": "/projects/automotive-iot-edge",
"/core-technologies/artificial-intelligence": "/solutions/ai-ml",
"/windows-on-arm": "/projects/windows-on-arm",
"/support": "/contact",
"/about/team": "/about",
"/about/tsc": "/about",
// '/learning-hub/[...slug]': '/about',
"/whitepapers/protecting-investment-in-code-optimisation-with-toolchain-ci-linaro-white-paper/":
"/whitepapers",
"/sig": "/",
"/latest/downloads": "/downloads",
//hidden pages
"/connect": "/",
"/connect/registration": "/",
"/connect/schedule": "/",
"/connect/sponsorship": "/",
"/connect/call-for-proposals/": "/",
"/technologies/apache-big-top": "/",
"/projects/automotive-iot-edge": "/",
"/technologies/ai-ml": "/",
"/solutions/ai-ml": "/",
"/projects/cloud-computing": "/",
"/solutions/codelinaro": "/",
"/confidential-computing": "/solutions/confidential-computing",
},
});