-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
140 lines (135 loc) · 3.96 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import mdx from '@astrojs/mdx'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import { transformerCopyButton } from '@rehype-pretty/transformers'
import {
transformerMetaHighlight,
transformerNotationDiff,
} from '@shikijs/transformers'
import { defineConfig } from 'astro/config'
import rehypeKatex from 'rehype-katex'
import rehypeExternalLinks from 'rehype-external-links'
import rehypePrettyCode from 'rehype-pretty-code'
import remarkEmoji from 'remark-emoji'
import remarkMath from 'remark-math'
import remarkToc from 'remark-toc'
import sectionize from '@hbsnow/rehype-sectionize'
import icon from 'astro-icon'
import partytown from '@astrojs/partytown'
import swup from '@swup/astro';
// https://astro.build/config
export default defineConfig({
site: 'https://sadman.ca',
integrations: [
tailwind({
applyBaseStyles: false,
}),
sitemap(),
mdx(),
react(),
icon(),
partytown({
config: {
forward: ["dataLayer.push"],
},
}),
swup({
animationClass: 'transition-',
containers: ['main'],
cache: true,
preload: {
hover: true,
visible: true
},
accessibility: true,
forms: false,
morph: false,
parallel: false,
progress: true,
routes: false,
smoothScrolling: false,
updateBodyClass: false,
updateHead: true,
reloadScripts: true,
debug: false,
loadOnIdle: true,
globalInstance: false,
})
],
redirects: {
'/uoft-pey-coop-jobs-2023': '/uoft-pey-coop-jobs-2023.html',
'/uoft-work-study-2024': '/uoft-work-study-2024.html',
'/uoft-work-study-jobs-2024': '/uoft-work-study-2024.html',
'/blog/on-keeping-a-journal': '/posts/on-keeping-a-journal',
'/blog/coming-up-with-good-ideas': '/posts/coming-up-with-good-ideas',
'/blog/how-i-deal-with-email': '/posts/how-i-deal-with-email',
'/blog/why-i-use-trello': '/posts/why-i-use-trello',
'/blog/a-guide-to-learning': '/posts/a-guide-to-learning/',
'/blog/my-old-vs-code-setup': '/posts/my-old-vs-code-setup/',
'/blog/advice-for-high-school-freshmen': '/posts/advice-for-high-school-freshmen/',
'/blog/analyzing-pey-postings-part-1': '/posts/analyzing-pey-postings-part-1/',
'/blog/software-showcase-01-asciinema': '/posts/software-showcase-01-asciinema/',
'/blog/how-to-put-20k+-words-on-a-cheatsheet': '/posts/how-to-put-20k+-words-on-a-cheatsheet/',
'/blog/work-study-at-uoft': '/posts/work-study-at-uoft/',
'/blog/pey-coop-jobs-at-uoft': '/posts/pey-coop-jobs-at-uoft/',
'/categories': '/tags',
'/archives': '/posts',
'/blog': '/posts',
},
markdown: {
syntaxHighlight: false,
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow', 'noreferrer', 'noopener'],
content: { type: "text", value: " ↗" }, // ⤴
contentProperties: { "aria-hidden": true, class: "no-select" },
},
],
rehypeHeadingIds,
rehypeKatex,
// @ts-expect-error
sectionize,
[
rehypePrettyCode,
{
theme: {
light: 'github-light-high-contrast',
dark: 'github-dark-high-contrast',
},
transformers: [
transformerNotationDiff(),
transformerMetaHighlight(),
transformerCopyButton({
visibility: 'hover',
feedbackDuration: 1000,
}),
],
},
],
],
remarkPlugins: [remarkToc, remarkMath, remarkEmoji],
},
server: {
port: 1234,
host: true,
},
devToolbar: {
enabled: false,
},
output: 'static',
legacy: {
collections: true
},
image: {
// Used for all `<Image />` and `<Picture />` components unless overridden
experimentalLayout: 'responsive',
},
experimental: {
responsiveImages: true,
},
})