-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
48 lines (42 loc) · 1.24 KB
/
astro.config.ts
File metadata and controls
48 lines (42 loc) · 1.24 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
// @ts-check
import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import rehypeExternalLinks from 'rehype-external-links'
import sitemap from '@astrojs/sitemap';
// https://astro.build/config
export default defineConfig({
site: 'https://www.toddhgardner.com/',
trailingSlash: "never",
build: {
// setting the format: file builds the site so Github Pages will serve it
// without trailing slashes.
format: "file"
},
integrations: [
mdx(),
sitemap({
filter: (page) =>
page !== 'https://www.toddhgardner.com/contact',
})
],
markdown: {
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: 'noopener'
},
],
],
},
redirects: {
"/article/[...slug]": "/blog/[...slug]", // very old blog format that still gets some clicks
"/blog/[...slug]/index": "/blog/[...slug]", // jekyll-style links. this captures both trailing slash and index
"/contact/index": "/contact",
"/r": "/", // Someone is linking to this URL
// convenience helpers
"/hi": "/contact?utm_source=hi",
"/headshot": "/headshot.jpg"
}
})