-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
69 lines (67 loc) · 2.14 KB
/
Copy pathastro.config.mjs
File metadata and controls
69 lines (67 loc) · 2.14 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import { defineConfig, passthroughImageService } from "astro/config";
import remarkCodeBlockCollapse from "@southball/remark-code-block-collapse";
import remarkToc from "remark-toc";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeSlug from "rehype-slug";
import compress from "astro-compress";
import icon from "astro-icon";
import caddyfileGrammar from "./shiki/caddyfile.tmLanguage.json" assert { type: "json" };
export default defineConfig({
build: {
inlineStylesheets: "always",
},
markdown: {
remarkPlugins: [
remarkCodeBlockCollapse,
[remarkToc, { ordered: true, tight: true }],
],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
content: {
type: "element",
tagName: "span",
properties: { className: ["icon-link"] },
children: [
{
type: "element",
tagName: "svg",
properties: { viewBox: "0 0 256 256" },
children: [
{
type: "element",
tagName: "path",
properties: {
fill: "currentColor",
d: "M225.3 82.7a51.8 51.8 0 0 1-15.3 36.8l-28.3 28.3a52 52 0 0 1-73.5 0 8 8 0 1 1 11.3-11.3 36.1 36.1 0 0 0 50.9 0l28.3-28.3a36 36 0 1 0-50.9-50.9L128 77.1a8 8 0 0 1-11.3-11.3L136.5 46a52.1 52.1 0 0 1 88.8 36.7zM128 178.9l-19.8 19.8a36 36 0 0 1-50.9-50.9l28.3-28.3a36.1 36.1 0 0 1 50.9 0 8 8 0 0 0 11.3-11.3 52 52 0 0 0-73.5 0L46 136.5a52 52 0 1 0 73.5 73.5l19.8-19.8a8 8 0 0 0-11.3-11.3z",
},
},
],
},
],
},
},
],
],
remarkRehype: {
footnoteLabelTagName: "h1",
},
shikiConfig: {
theme: "css-variables",
langs: [
{
id: "caddy",
scopeName: "source.Caddyfile",
grammar: caddyfileGrammar,
aliases: ["caddyfile", "caddy"],
},
],
},
},
image: {
service: passthroughImageService(),
},
integrations: [compress(), icon()],
});