
如何安装主题
安装主题
使用 Git Submodules
比较推荐的安装主题的办法是通过 Git Submodules。
首次安装时,你需要执行以下命令:
git submodule add https://github.com/bin16/hugo-theme-island themes/hugo-theme-island另外记得更新你的配置文件使用该主题。
在提交你的站点之后,当你需要在别处 clone 你的项目时,只需要执行以下命令:
git clone --recurse-submodules https://你的项目仓库地址你可能在克隆时不记得附带 --recurse-submodules 语句,那也没有关系,只需要执行以下命令:
git submodule update --init --recursive使用 Hugo Modules
你也可以使用 Hugo Modules 来安装主题。
参见:https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme
