| ツール | バージョン | 備考 |
|---|---|---|
| Hugo | ≥ 0.141.0 extended | brew install hugo |
| Git | 任意 | submodule 管理用 |
| Emacs | ≥ 29 | 記事執筆用 |
| ox-hugo | 最新 | Org → Hugo Markdown |
| mmdc | 任意 | Mermaid 図の生成 |
hugo new site mysite
cd mysite
git initgit submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfishcp themes/blowfish/config/_default/* config/_default/straight.el を利用(~orgx/orgx-export.el~ で設定済み)
M-x straight-pull-allox-hugo がロードされていることを確認
M-: (featurep 'ox-hugo) ; => tBlowfish テーマは Git submodule として管理されています。 リポジトリを clone した直後や、テーマ更新時は以下を実行します。
git clone --recursive https://github.com/<your-repo>.git
cd <your-repo>すでに clone 済みの場合:
git submodule update --init --recursiveBlowfish テーマを upstream の最新に更新する場合:
git submodule update --remote --merge themes/blowfish更新後は必ずコミットします:
git add themes/blowfish
git commit -m "chore: update blowfish theme"git submodule update --remote --recursivegit submodule statusリモートURL変更などがあった場合:
git submodule sync --recursive
git submodule update --init --recursivesubmodule が壊れた場合:
git submodule deinit -f themes/blowfish
rm -rf .git/modules/themes/blowfish
git submodule update --init --recursiveすべての記事は Org-mode で作成し、ox-hugo により Markdown へ変換されます。
content-org/
├── about.org
└── posts/
└── my-post.org
content/ (ox-hugo により生成・手動編集しない)
├── about/
│ └── index.md
└── post/
└── my-post/
└── index.md
#+TITLE: My Post Title
#+DATE: <2026-03-15>
#+HUGO_BASE_DIR: <HUGO_BASE_DIR>
#+HUGO_SECTION: post
#+HUGO_TAGS: hugo emacs
#+HUGO_CATEGORIES: tech
| 操作 | キーバインド | 説明 |
|---|---|---|
| 新規投稿作成 | C-c c b | org-capture で投稿作成 |
| サブツリー export | C-c C-e H H | 現在 subtree を export |
| 全体 export | C-c C-e H A | Org ファイル全体 export |
hugo server --buildDrafts --disableFastRenderOpen: http://localhost:1313
git submodule update --remote --merge themes/blowfish
git add themes/blowfish
git commit -m "chore: update blowfish theme"# 本番ビルド
hugo
# リンクチェック
hugo --gc --minify
# バージョン確認
hugo version設定ファイルは config/_default/ に配置
| ファイル | 用途 |
|---|---|
hugo.toml | サイト全体設定 |
params.toml | Blowfish テーマ設定 |
languages.en.toml | 言語・著者情報 |
menus.en.toml | ナビゲーション |
markup.toml | Markdown / syntax highlight |
module.toml | Hugo module |
# .github/workflows/deploy.yml
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.157.0'
extended: true
- name: Build
run: hugo --minifyhugo --minify
# 出力先: ./public/Content © YAMASHITA, Takao. All rights reserved. Theme: Blowfish — MIT License.