rehype-external-links添加了这个插件
This commit is contained in:
1 parent
2eb2e8a979
commit
34f8f143da
3 files changed
+80
No files matched your search
@@ -23,6 +23,7 @@ import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js";
|
||||
import { remarkExcerpt } from "./src/plugins/remark-excerpt.js";
|
||||
import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs";
|
||||
import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-copy-button.js";
|
||||
import rehypeExternalLinks from 'rehype-external-links';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
@@ -128,6 +129,12 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
rehypeExternalLinks,
|
||||
{
|
||||
target: '_blank',
|
||||
},
|
||||
],
|
||||
[
|
||||
rehypeAutolinkHeadings,
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user