-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathastro.config.mjs
More file actions
48 lines (46 loc) · 1.8 KB
/
astro.config.mjs
File metadata and controls
48 lines (46 loc) · 1.8 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
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import remarkToc from 'remark-toc';
import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis';
import rehypeAutolinkHeadings from 'rehype-autolink-headings/lib';
import { h, s } from 'hastscript';
import rehypeSlug from 'rehype-slug';
import remarkReadingTime from './plugins/reading-time.mjs';
// https://astro.build/config
export default defineConfig({
site: 'https://eludris.com',
integrations: [mdx(), sitemap()],
vite: {
ssr: {
external: ['svgo']
}
},
markdown: {
syntaxHighlight: 'prism',
remarkPlugins: [[remarkToc, { heading: 'main things', tight: true }], remarkReadingTime],
rehypePlugins: [
rehypeAccessibleEmojis,
rehypeSlug,
[
rehypeAutolinkHeadings,
{
behavior: 'before',
content() {
return s(
'svg.link-icon',
{ xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', width: '24', heignt: '24' },
s('path', {
fill: 'currentColor',
d: 'M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24a2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24a2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24a.973.973 0 0 1 0-1.42Z'
})
);
},
group() {
return h('span.header')
}
}
]
]
}
});