Skip to content

Commit dd8c0f5

Browse files
committed
chore: added sectionising
1 parent 14d58f6 commit dd8c0f5

File tree

6 files changed

+286
-22
lines changed

6 files changed

+286
-22
lines changed

astro.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import partytown from "@astrojs/partytown";
88

99
import sitemap from "@astrojs/sitemap";
1010

11-
import remarkToc from "remark-toc";
1211
import rehypeAutolinkHeadings from "rehype-autolink-headings";
1312
import { rehypeHeadingIds } from "@astrojs/markdown-remark";
1413

14+
import sectionize from "@hbsnow/rehype-sectionize";
15+
1516
// https://astro.build/config
1617
export default defineConfig({
1718
site: "https://ringoldsdev.github.io/",
@@ -26,9 +27,9 @@ export default defineConfig({
2627
plugins: [tailwindcss()],
2728
},
2829
markdown: {
29-
remarkPlugins: [[remarkToc, { heading: "contents" }]],
3030
rehypePlugins: [
3131
rehypeHeadingIds,
32+
sectionize,
3233
[rehypeAutolinkHeadings, { behavior: "wrap" }],
3334
],
3435
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@astrojs/partytown": "^2.1.4",
1818
"@astrojs/rss": "^4.0.11",
1919
"@astrojs/sitemap": "^3.3.1",
20+
"@hbsnow/rehype-sectionize": "^1.0.7",
2021
"alpinejs": "^3.14.9",
2122
"astro": "^5.7.12",
2223
"rehype-autolink-headings": "^7.1.0",

0 commit comments

Comments
 (0)