-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathastro.config.ts
125 lines (118 loc) · 3.83 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
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 { defineConfig } from 'astro/config'
import rehypeKatex from 'rehype-katex'
import rehypeExternalLinks from 'rehype-external-links'
import remarkEmoji from 'remark-emoji'
import remarkMath from 'remark-math'
import remarkToc from 'remark-toc'
import sectionize from '@hbsnow/rehype-sectionize'
import { FontaineTransform } from 'fontaine';
import icon from 'astro-icon'
import swup from '@swup/astro';
import expressiveCode from 'astro-expressive-code';
// https://astro.build/config
export default defineConfig({
site: 'https://sadman.ca',
vite: {
plugins: [
FontaineTransform.vite({
fallbacks: ['Arial'],
resolvePath: (id) => new URL(`./public${id}`, import.meta.url), // id is the font src value in the CSS
}),
],
},
integrations: [tailwind({
applyBaseStyles: false,
}), sitemap(), expressiveCode(), mdx(), react(), icon(), 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: true,
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-2025': '/uoft-work-study-2025-summer.html',
'/uoft-work-study-jobs-2025': '/uoft-work-study-2025-summer.html',
'/uoft-work-study-2024': '/uoft-work-study-2024.html',
'/uoft-work-study-jobs-2024': '/uoft-work-study-2024.html',
'/work-study': '/uoft-work-study-2024.html',
'/uoft-work-study': '/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/',
'/magellan-101/': '/posts/uoft-ece-upper-year-course-reviews/',
'/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,
],
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,
},
prefetch: {
defaultStrategy: 'hover',
prefetchAll: true,
}
})