2022-07-17  2024-09-18    301 字  1 分钟

GitHub

https://github.com/gohugoio/hugo.git

Build

  1. 使用官方编译版本
  2. 使用源码编译

http://pi.akvicor.com:7021/?p=199

1wget http://pi.akvicor.com:7021/file?f=1233 -O hugo_build.tgz
2tar -zxvf hugo_build.tgz
3cd hugo
4./build.sh

Install

1mv gopath/bin/hugo /usr/bin/hugo
2hugo version

Usage

 1# 版本和环境详细信息
 2hugo env
 3
 4# 创建新站点
 5hugo new site siteName
 6
 7# 创建文章
 8hugo new index.md
 9
10# 编译生成静态文件并输出到public目录
11hugo
12
13# 编译生成静态文件并启动web服务
14hugo server

主题

https://github.com/athul/archie

1mkdir themes
2cd themes
3git clone https://github.com/athul/archie.git

配置

 1baseURL = "https://blog.akvicor.com/"
 2languageCode = "en-us"
 3title = "Akvicor's Blog"
 4theme = "archie"
 5copyright = "© Akvicor"
 6# Code Highlight
 7pygmentsstyle = "monokai"
 8pygmentscodefences = true
 9pygmentscodefencesguesssyntax = true
10paginate = 7 # articles per page
11
12[params]
13	favicon = "https://paste.akvicor.com/file/1657810677_8674665223082153551_1656915732559.jpg"
14	mode = "toggle" # color-mode → light,dark,toggle or auto
15	useCDN = false # don't use CDNs for fonts and icons, instead serve them locally.
16	subtitle = "{{< kidding title=\"完全没理解\" text=\"太棒了,我逐渐理解一切\" >}}"
17	customcss = ["css/heimu.css"]
18
19[[menu.main]]
20name = "Home"
21url = "/"
22weight = 1
23
24[[menu.main]]
25name = "All posts"
26url = "/post"
27weight = 2
28
29[[menu.main]]
30name = "About"
31url = "/about"
32weight = 3
33
34[[menu.main]]
35name = "Tags"
36url = "/tags"
37weight = 4

除另有声明外本博客文章均采用 知识共享 (Creative Commons) 署名 4.0 国际许可协议 进行许可转载请注明原作者与文章出处