使用Hugo创建个人博客
安装
Centos 系统安装方法:
yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/repo/epel-7/daftaupe-hugo-epel-7.repo
yum -y install hugo
hugo version
Mac 系统安装方法: 使用
# 安装
brew install hugo
# 测试
hugo version
如果 安装不成功,可以直接下载二进制文件安装 下载并解压后。
# 改成可运行
chmod +x hugo
# 放到用户目录
mv hugo /usr/local/bin/
# 测试
hugo version
之后的创建站点、使用主题、添加内容、启动等都可以从quick-start查看到。
debian 系统安装方法
apt install -y hugo
创建 blog
- 参考 官方教程初始化一个 blog
# 找一个文件夹
mkdir -p /usr/share/www
cd /usr/share/www && hugo new site myblog
cd myblog
git init
# 配置主题
git submodule add https://gitee.com/smile365/wehuth.git themes/wehuth
# 配置文件
cp themes/wehuth/exampleSite/config.toml .
Comments