Nextraでドキュメント構築してみたよ!
hugo
theme
learn
基本
インストール

前提

ここでは、既にHugoがインストールされているものとして、明記します
Hugoのバージョンは0.25より最新であれば良さそうです
現状

$ hugo version
hugo v0.107.0+extended darwin/amd64 BuildDate=unknown

また、Gitも利用します

$ git version
git version 2.38.1

プロジェクト作成

hugo new site learn

テーマインストール

matcornic/hugo-theme-learn: Porting Grav Learn theme to Hugo (opens in a new tab)からzipダウンロードし、themes配下に解凍もしくは、git cloneする

  • git clone
cd themes/
git clone https://github.com/matcornic/hugo-theme-learn.git learn

submodule

上記以外、submodule形式でインストールしたい場合

pwd
/learn

git init
git submodule add https://github.com/matcornic/hugo-theme-learn.git themes/learn

GitHub + learn(submodule)

現在の環境では、Githubにリポジトリ(hugo-learn)を作成し、learnテーマをsubmodule形式でGit管理しているので、最終的には、下記のようにインストールしています

hugo new site lean
cd learn
git init
git submodule add https://github.com/matcornic/hugo-theme-learn.git themes/learn
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://<oauth2_token>@github.com/user/hugo-learn.git
git push -u origin main