Skip to content

Conversation

flydo
Copy link
Contributor

@flydo flydo commented Feb 26, 2023

  1. 新增一言开关
  2. 新增 51.LA 统计
  3. 优化百度统计:无统计 ID 时不引入相关的 JS
  4. 单页面的样式修改
  5. 静态资源引用的方式

官方提供的 with,已经可以判断空值、无值和 0
https://gohugo.io/functions/with/

官方提供的 relURL,可以取得相对路径
https://gohugo.io/functions/relurl/

文档中,可以直接使用 WebStack-Hugo 默认的主题,所以功能参数支持定制化相对好些,这样的话,可以实时从主仓库拉取更新。
https://gohugo.io/getting-started/quick-start/#commands

我的做法是:

# 创建项目
mkdir navsites
cd $_

# 初始化项目
git init

# 将 WebStack-Hugo 源下载到 themes/WebStack-Hugo 文件夹
git submodule add https://github.com/shenweiyan/WebStack-Hugo.git themes/WebStack-Hugo
cp -r themes/WebStack-Hugo/exampleSite/* ./

# 安装 hugo
go install github.com/gohugoio/hugo@latest

# 本地测试
hugo server

# 生成 docs 文件夹,将并静态内容生成至此处
hugo -D

以后有更新的时候,直接进入 themes/WebStack-Hugo,从 https://github.com/shenweiyan/WebStack-Hugo.git 拉取源码即可。

@shenweiyan
Copy link
Owner

感谢 PR,我先看看,测试一下 >.<

@shenweiyan shenweiyan merged commit a0021ec into shenweiyan:main Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants