-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
152 lines (148 loc) · 3.55 KB
/
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
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
141
142
143
144
145
146
147
148
149
150
151
152
import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import astroFont from '@gamesome/astro-font'
import icon from 'astro-icon'
import sitemap from '@astrojs/sitemap'
import { remarkModifiedTime } from './remark-plugins/remark-modified-time.mjs'
import { remarkReadingTime } from './remark-plugins/remark-reading-time.mjs'
import { remarkWidont } from './remark-plugins/remark-widont.mjs'
import {
remarkDefinitionList,
defListHastHandlers
} from 'remark-definition-list'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeAutoLinkHeadings from 'rehype-autolink-headings'
import rehypeSlug from 'rehype-slug'
// https://astro.build/config
export default defineConfig({
site: 'https://hawk-gt1191.de',
trailingSlash: 'never',
build: {
format: 'directory'
},
redirects: {
'/komponenten': {
status: 301,
destination: '/assets'
},
'/links': {
status: 301,
destination: '/dokumentation'
},
'/hilfe': '/dokumentation',
'/seminar': '/',
'/tutorials/lernpfade': '/tutorials/lernpfade/grundlagen'
},
markdown: {
shikiConfig: {
theme: 'github-dark',
wrap: true
},
gfm: true,
smartypants: true,
remarkPlugins: [
remarkWidont,
remarkDefinitionList,
remarkModifiedTime,
remarkReadingTime
],
rehypePlugins: [
rehypeSlug,
[
rehypeAutoLinkHeadings,
{
content: {
type: 'element',
tagName: 'span',
properties: { className: 'heading-icon' },
children: []
}
}
],
[rehypeExternalLinks, {}]
]
},
integrations: [
mdx({
remarkRehype: {
handlers: {
...defListHastHandlers
},
footnoteLabel: 'Fußnoten',
footnoteBackLabel: 'Zurück zum Inhalt'
},
gfm: true
}),
sitemap({
lastmod: new Date(),
filter: (page) =>
page !== 'https://hawk-gt1191.de/impressum' &&
page !== 'https://hawk-gt1191.de/datenschutz'
}),
astroFont({
families: [
{
name: 'Open Sans Variable',
imports: ['@fontsource-variable/open-sans/wdth.css']
},
{
name: 'Domine Variable',
type: 'sans-serif',
applyFontFamilyToSelector: ':where(h1, h2, h3, h4)',
imports: ['@fontsource-variable/domine/wght.css']
},
{
name: 'JetBrains Mono Variable',
type: 'mono',
fallbacks: ['Courier New'],
applyFontFamilyToSelector: 'code',
imports: ['@fontsource-variable/jetbrains-mono/wght.css']
}
]
}),
icon({
include: {
materialSymbols: [
'menu',
'close',
'monitor-outline',
'arrow-upward-rounded',
'keyboard-double-arrow-left',
'keyboard-double-arrow-right',
'keyboard-arrow-left',
'keyboard-arrow-right',
'schedule-outline'
],
simpleIcons: ['discord', 'github']
},
svgoOptions: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
inlineStyles: {
onlyMatchedOnce: false
}
}
}
}
]
}
})
],
vite: {
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler'
}
}
}
},
experimental: {
responsiveImages: true,
svg: true
}
})