使用Hugo搭建个人博客

Step 1: 安装 Hugo

sudo apt-get install hugo:此方法安装的Hugo版本较低,暂不推荐使用
下载二进制安装包直接安装:hugo_0.37_Linux-64bit.deb
检查Hugo版本:hugo version
使用Hugo搭建个人博客

Step 2: 创建一个新站点

hugo new site quickstart该命令将在quickstart文件夹中创建一个新的Hugo网站

Step 3: 添加一个主题

可以从themes.gohugo.io选择你想要的主题,我这里使用的是漂亮清爽的博客主题startbootstrap-clean-blog
cd quickstart
git init
git submodule add https://github.com/humboldtux/startbootstrap-clean-blog.git themes/cleanblog
以上命令会把博客主题下载在themes/cleanblog文件中
nano config.toml编辑配置文件

Step 4: 添加博客文章

hugo new posts/my-first-post.md

Step 5: 启动Hugo博客

以草稿draft模式启动博客:hugo server -D
使用Hugo搭建个人博客
浏览器打开你的新站点:http://localhost:1313/

https://gohugo.io/getting-started/quick-start/