Build a website by Hugo 2

从零开始Hugo建站(Environment configuration+hugo's themes)

从零开始Hugo建站(2)

碎碎念时间:

上一期的git学习对于站点建立的基础有了很大的提升,然后了解到了hugo pagegitbook,使用选择了免费的page建立站点,对于hugo主题选择,使用过了星标人数较多的loveitstack,最终选择了stack主题,也经历了yaml\toml的弯路

1. 系统安装(虚拟机环境)

VMware workstation中安装虚拟系统ubuntu

2. hugo安装与学习

2.1 本地hugo站点的建立

1
hugo new site myblog  #本地建立网站站点

2.2 主题配置 Installation

1
2
3
4
5
6
7
8
9
mkdir themes
cd themes
git clone git@github.com:CaiJimmy/hugo-theme-stack.git

# myblog下config.toml
# 设置网站的地址  baseurl="http://legenddog.github.io"
# 把主题目录下文件复制到根目录下 config.toml
# 注意hugo-theme-stack需要hugo version 0.86以上
# i18n配置 DefaultcontentLanguage ---- en

2.3 把本地的blog推送远端

1
2
3
4
5
6
7
cd public
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin ----
git push -u origin main 

一些关于linux的好用的bash命令

1
2
3
$ which hugo
$ pwd
$ history

wsl GUI GNOME

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计