mirror of
https://github.com/MCKero6423/fuwari.git
synced 2026-10-02 03:15:35 +00:00
feat: add heading anchor links
This commit is contained in:
1 parent
cff918dab3
commit
83e22e7e59
4 files changed
+73
-7
No files matched your search
+12
-1
@@ -9,6 +9,8 @@ import rehypeKatex from "rehype-katex";
|
||||
|
||||
import Color from 'colorjs.io';
|
||||
import remarkMath from "remark-math";
|
||||
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
||||
import rehypeSlug from "rehype-slug";
|
||||
|
||||
// https://astro.build/config
|
||||
|
||||
@@ -37,7 +39,16 @@ export default defineConfig({
|
||||
],
|
||||
markdown: {
|
||||
remarkPlugins: [remarkMath, remarkReadingTime],
|
||||
rehypePlugins: [rehypeKatex]
|
||||
rehypePlugins: [rehypeKatex, rehypeSlug,
|
||||
[rehypeAutolinkHeadings, {
|
||||
behavior: 'append',
|
||||
properties: {className: ['anchor']},
|
||||
content: {
|
||||
type: 'element',
|
||||
tagName: 'span',
|
||||
properties: {className: ['anchor-icon']},
|
||||
children: [{type: 'text', value: '#'}]
|
||||
}}]]
|
||||
},
|
||||
redirects: {
|
||||
'/': '/page/1',
|
||||
|
||||
Reference in new issue
Block a user