-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
76 lines (74 loc) · 2 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
import { defineConfig } from "astro/config";
import robotsTxt from "astro-robots-txt";
import partytown from "@astrojs/partytown";
import sitemap from "@astrojs/sitemap";
import compress from "astro-compress";
import tailwind from "@astrojs/tailwind";
import mdx from "@astrojs/mdx";
import { getReadTime } from "./src/lib/remark-read-time.mjs";
import remarkCapitalize from "remark-capitalize";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import { h } from "hastscript";
import { rehypePrismCommon } from "rehype-prism-plus";
import sectionize from "remark-sectionize";
import { setDefaultLayout } from "./src/lib/remark-default-layout.mjs";
import { setPublishedEditedDates } from "./src/lib/remark-auto-pub-edit-date.mjs";
import { setBlogContentPreview } from "./src/lib/remark-blog-content-preview.mjs";
import autoImports from "@mdxvac/remark-astro-autoimports";
export default defineConfig({
site: "https://franciskafieh.com",
integrations: [
robotsTxt({
policy: [
{
userAgent: "*",
disallow: "/form",
},
],
}),
sitemap(),
compress(),
mdx({
remarkPlugins: {
extends: [
getReadTime,
remarkCapitalize,
sectionize,
setDefaultLayout,
setPublishedEditedDates,
setBlogContentPreview,
autoImports,
],
},
rehypePlugins: {
extends: [
[
rehypeAutolinkHeadings,
{
content(_node) {
return [
h("span.invisible.text-accent.absolute.-left-5.pr-3", "#"),
];
},
},
],
[
rehypePrismCommon,
{
ignoreMissing: true,
},
],
],
},
}),
tailwind({ config: { applyBaseStyles: false } }),
partytown(),
],
experimental: {
integrations: true,
},
markdown: {
// using rehype-prism-plus
syntaxHighlight: false,
},
});