Skip to content

Instantly share code, notes, and snippets.

@ksugawara61
Last active February 3, 2024 04:20
Show Gist options
  • Save ksugawara61/1a24b178d7097722b3431c0d1cc6299f to your computer and use it in GitHub Desktop.
Save ksugawara61/1a24b178d7097722b3431c0d1cc6299f to your computer and use it in GitHub Desktop.
denoのSSGライブラリpagicを試す

Pagicを試す

https://pagic.org/docs/introduction.html

ルートディレクトリに以下のような設定ファイルをおく

export default {
  srcDir: "src",
  outDir: "public",
  theme: "blog",
};

以下の手順で動作確認できる

  1. インストール: deno install --unstable --allow-read --allow-write --allow-net --allow-env --allow-run --name=pagic https://deno.land/x/pagic/mod.ts
  2. ~/.deno/bin 配下にCLIが追加される
  3. ~/.deno/bin/pagic build --watch --serve のようなコマンドで確認できる

感想

  • blogテーマがデフォルトであるので良い感じにファイルが作れる
  • Markdownのmermaidサポートはない
  • 画像のパスは意識する必要がある
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment