feat: add code copy cutton

This commit is contained in:
radishzzz 2025-05-27 01:37:19 +01:00
parent 9c87c1bf03
commit 3312b30dbf
7 changed files with 132 additions and 5 deletions

View file

@ -15,6 +15,7 @@ import { visit } from 'unist-util-visit'
import UnoCSS from 'unocss/astro'
import { themeConfig } from './src/config'
import { langMap } from './src/i18n/config'
import { rehypeCodeCopyButton } from './src/plugins/rehype-code-copy-button.mjs'
import { rehypeImgToFigure } from './src/plugins/rehype-img-to-figure.mjs'
import { rehypeUnwrapImg } from './src/plugins/rehype-unwrap-img.mjs'
import { remarkAdmonitions } from './src/plugins/remark-admonitions.mjs'
@ -78,6 +79,7 @@ export default defineConfig({
rehypePlugins: [
rehypeKatex,
rehypeSlug,
rehypeCodeCopyButton,
rehypeImgToFigure,
rehypeUnwrapImg, // Must be after rehypeImgToFigure
[