换主题
- 按照主题主页操作,下载主题文件到themes路径中;
- 修改配置文件config.toml里的
theme = '...'名称; - Ctrl + c关闭hugo server;
- 重启
hugo server -D
配置文件config.toml的设置要点
baseURL:你的博客地址
https://yourName.github.io/;enableEmoji
pageinate = “3” 每页显示的文章
title: 标题
theme:主题名 以Jane为例
defaultContentLanguage = “zh-cn”
下载的主题文件里有.git
直接删掉:
|
|
或者gitignore掉,在 Blog 目录下创建并修改 .gitignore
|
|
不需要生成子仓库
添加 .gitignore 文件
在 Hugo 本地编译时会产生 public 文件夹,但是这个文件夹中的内容对于 Blog 仓库来说是不需要的 (包括用来存放主题的 themes 文件夹和主题产生的 resources 文件夹也是不需要的)
可以用一个.gitignore 文件来排除这些内容
在 Blog 目录下创建并修改 .gitignore
1 2 3public/* themes/* resources/*
然后提交到 GitHub
·未完待续·
参考文章
- 无
相关文章
- 无