diff --git a/astro.config.mjs b/astro.config.mjs index f33dcd8..522f890 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,6 +2,7 @@ import { defineConfig } from 'astro/config'; import mdx from '@astrojs/mdx'; import tailwindcss from "@tailwindcss/vite"; +import remarkToc from 'remark-toc'; import { unified } from '@astrojs/markdown-remark'; import { ScriptureLinks } from './src/utils/rehype'; @@ -13,6 +14,7 @@ export default defineConfig({ integrations: [mdx()], markdown: { processor: unified({ + remarkPlugins: [remarkToc], rehypePlugins: [ScriptureLinks], }), }, diff --git a/package-lock.json b/package-lock.json index 1210e2c..97c5636 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@astrojs/mdx": "^6.0.1", "@tailwindcss/vite": "^4.3.0", "astro": "^6.4.2", + "remark-toc": "^9.0.0", "tailwindcss": "^4.3.0" }, "engines": { @@ -2067,6 +2068,12 @@ "@types/unist": "*" } }, + "node_modules/@types/ungap__structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/ungap__structured-clone/-/ungap__structured-clone-1.2.0.tgz", + "integrity": "sha512-ZoaihZNLeZSxESbk9PUAPZOlSpcKx81I1+4emtULDVmBLkYutTcMlCj2K9VNlf9EWODxdO6gkAqEaLorXwZQVA==", + "license": "MIT" + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -4048,6 +4055,25 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-toc": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-toc/-/mdast-util-toc-7.1.0.tgz", + "integrity": "sha512-2TVKotOQzqdY7THOdn2gGzS9d1Sdd66bvxUyw3aNpWfcPXCLYSJCCgfPy30sEtuzkDraJgqF35dzgmz6xlvH/w==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/ungap__structured-clone": "^1.0.0", + "@ungap/structured-clone": "^1.0.0", + "github-slugger": "^2.0.0", + "mdast-util-to-string": "^4.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdn-data": { "version": "2.27.1", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", @@ -5359,6 +5385,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-toc": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-toc/-/remark-toc-9.0.0.tgz", + "integrity": "sha512-KJ9txbo33GjDAV1baHFze7ij4G8c7SGYoY8Kzsm2gzFpbhL/bSoVpMMzGa3vrNDSWASNd/3ppAqL7cP2zD6JIA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-toc": "^7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", diff --git a/package.json b/package.json index 5274f56..9c048be 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@astrojs/mdx": "^6.0.1", "@tailwindcss/vite": "^4.3.0", "astro": "^6.4.2", + "remark-toc": "^9.0.0", "tailwindcss": "^4.3.0" } }