rehype-header-linksを追加

This commit is contained in:
moris 2025-03-06 11:59:38 +09:00
parent 94f40c51e0
commit 18a08efa6a
4 changed files with 7 additions and 1 deletions

View file

@ -245,7 +245,7 @@
}
}
& .marker {
& .marker a{
text-decoration: line-through;
text-decoration-thickness: 1.125em;

View file

@ -11,6 +11,7 @@ import rehypeHighlight from 'rehype-highlight'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeGithubAlert from 'rehype-github-alert'
import rehypeStringify from 'rehype-stringify'
import rehypeHeaderLinks from 'rehype-header-links'
function Perser(mdtext: string): string {
@ -24,6 +25,7 @@ function Perser(mdtext: string): string {
.use(rehypeHighlight) // Syntax highlight
.use(rehypeExternalLinks, {target:'_blank', rel:['noreferrer','noopener']}) // 外部サイトを新規タブで開く
.use(rehypeGithubAlert)
.use(rehypeHeaderLinks, {style: {color:'inherit'}})
.use(rehypeStringify, {allowDangerousHtml: true})
.processSync(mdtext)
.toString()