mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00
feat: add code copy cutton
This commit is contained in:
parent
9c87c1bf03
commit
3312b30dbf
7 changed files with 132 additions and 5 deletions
|
@ -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
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue