FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

优化: 一言开关,静态资源引用方式,单页面.新增51 LA统计 by flydo · Pull Request #15 · shenweiyan/WebStack-Hugo · GitHub

优化: 一言开关,静态资源引用方式,单页面.新增51 LA统计 - #15

Merged
shenweiyan merged 2 commits into
shenweiyan:mainfrom
flydo:main
Feb 27, 2023
Merged

优化: 一言开关,静态资源引用方式,单页面.新增51 LA统计#15
shenweiyan merged 2 commits into
shenweiyan:mainfrom
flydo:main

Conversation

flydo commented Feb 26, 2023

Copy link
Copy Markdown
Contributor
  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 拉取源码即可。

Copy link
Copy Markdown
Owner

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

shenweiyan merged commit a0021ec into shenweiyan:main Feb 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL