Codeblock
EmDash 代码块的 Shiki 语法高亮,在服务端渲染,并带复制按钮。
插件
Codeblock
EmDash 代码块的 Shiki 语法高亮,在服务端渲染,并带复制按钮。
EmDash 代码块的 Shiki 语法高亮,在服务端渲染,并带复制按钮。
安装
从 npm 安装该软件包:
npm install @plugdash/codeblock
在 Astro 配置中注册该插件:
// astro.config.mjs
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { codeblockPlugin } from "@plugdash/codeblock";
export default defineConfig({
integrations: [
emdash({
plugins: [codeblockPlugin({ theme: "github-dark", lineNumbers: true })], // native - must be in plugins, not sandboxed
}),
],
});
详细信息
- 最新版本: 0.4.0
- 许可证: MIT
- 发布者: abhinav061
- 要求: EmDash
>=0.13.0 - 源代码仓库: https://github.com/plugdash/plugdash
- npm 包: @plugdash/codeblock