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