Codeblock

EmDash のコードブロック向けの Shiki シンタックスハイライト。サーバー側で描画し、コピーボタン付きです。

プラグイン

Codeblock

EmDash のコードブロック向けの Shiki シンタックスハイライト。サーバー側で描画し、コピーボタン付きです。

  • カテゴリー: エディター体験
  • ステータス: 利用可能
  • バージョン: 0.4.0
  • 価格: 不明
  • 提供元: npm パッケージ
  • 導入方法: npm ネイティブ統合
  • 確認日: 2026-11-01

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
    }),
  ],
});

詳細