[译]Hugo-Theme-PaperMod主题文档 安装 | 升级

转载翻译自: https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/
作者:PaperMod Authors
已获得作者授权

中文demo

https://note.ftls.xyz/papermod/

介绍

  • 我们将在下面的所有示例中使用 yml/yaml 格式,我建议使用 yml 而不是 toml,因为它更易于阅读。

  • 如果你需要,你可以找 YML to TOML 这类转换器。


指南

按照 快速入门 指南设置 Hugo 并创建一个新站点。

注意:使用 -f 选择 yml 格式

hugo new site <name of site> -f yml

确保安装最新版本的**hugo(>=0.82.0)**。

创建新站点后,在Step 3 执行以下步骤:

方法一

在 Hugo 站点的文件夹中,运行:

git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1

注意:如果你想坚持特定的版本,你可以使用--branch v5.0来结束上面的命令。

更新主题 :

cd themes/PaperMod
git pull

方法二

您可以将其用作 submodule

git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod --depth=1
git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically)

注意:如果你想坚持特定的版本,你可以使用--branch v5.0来结束上面的命令。

更新主题 :

git submodule update --remote --merge

方法三

或者您可以从 Github Page 下载为 Zip 并解压到您的主题目录中

直达链接:

最后 …

config.yml中添加:

theme: "PaperMod"

相关链接


config.yml示例

示例站点在这里exampleSite

适当使用

baseURL: "https://examplesite.com/"
title: ExampleSite
paginate: 5
theme: PaperMod

enableRobotsTXT: true
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值