feat: copy button
This commit is contained in:
parent
1012f562ff
commit
4382f7165c
22 changed files with 197 additions and 752 deletions
|
@ -3,6 +3,7 @@ import mdx from '@astrojs/mdx'
|
|||
import react from '@astrojs/react'
|
||||
import sitemap from '@astrojs/sitemap'
|
||||
import tailwind from '@astrojs/tailwind'
|
||||
import { transformerCopyButton } from '@rehype-pretty/transformers'
|
||||
import {
|
||||
transformerMetaHighlight,
|
||||
transformerNotationDiff,
|
||||
|
@ -26,13 +27,6 @@ export default defineConfig({
|
|||
react(),
|
||||
],
|
||||
markdown: {
|
||||
// shikiConfig: {
|
||||
// transformers: [
|
||||
// transformerNotationDiff(),
|
||||
// transformerNotationFocus(),
|
||||
// transformerMetaHighlight(),
|
||||
// ],
|
||||
// },
|
||||
syntaxHighlight: false,
|
||||
rehypePlugins: [
|
||||
rehypeHeadingIds,
|
||||
|
@ -44,7 +38,14 @@ export default defineConfig({
|
|||
light: 'vitesse-light',
|
||||
dark: 'vitesse-dark',
|
||||
},
|
||||
transformers: [transformerNotationDiff(), transformerMetaHighlight()],
|
||||
transformers: [
|
||||
transformerNotationDiff(),
|
||||
transformerMetaHighlight(),
|
||||
transformerCopyButton({
|
||||
visibility: 'hover',
|
||||
feedbackDuration: 1000,
|
||||
}),
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue