-
Notifications
You must be signed in to change notification settings - Fork 8
/
astro.config.mjs
36 lines (34 loc) · 896 Bytes
/
astro.config.mjs
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
import { defineConfig } from 'astro/config';
import icon from "astro-icon";
import preact from "@astrojs/preact";
import sitemap from "@astrojs/sitemap";
import { EnumChangefreq as ChangeFreq } from "sitemap";
// https://astro.build/config
export default defineConfig({
integrations: [
icon(),
preact(),
sitemap({
changefreq: ChangeFreq.DAILY,
priority: 0.7,
lastmod: new Date(),
customPages: ["https://jfenn.me/policies/"],
serialize({ url, ...rest }) {
const matcher = /\/(\d{4}-\d{2}-\d{2})/.exec(url);
return {
url,
...rest,
lastmod: new Date(matcher?.at(1) ?? rest.lastmod).toISOString()
};
},
}),
],
site: "https://jfenn.me",
trailingSlash: "always",
redirects: {
'/community': '/contact/',
'/resume': '/resume.pdf',
'/apps/pasta': '/projects/',
'/apps/status': '/projects/',
}
});