使用Hugo搭建个人博客全教程(Windows版)
一、下载hugo
这里下载的是hugo_0.85.0_Windows-64bit.zip
解压后就一个exe文件
放在文件夹D:\hugo\bin
中,然后添加到环境变量中
执行 hugo -version
二、创建项目
进入指定目录之后,执行如下命令:
hugo new site myblog
三、添加主题
选择自己喜欢的背景主题进行git clone 下载
在当前项目目录内打开config.toml
配置文件,在最后添加一行theme = "uno"
名称为刚刚我们拷贝的项目名称
四、运行项目
在项目根目录执行
hugo server -D
运行结果如下,表示我们项目运行成功。
浏览器输入localhost:1313
,即可看到如下内容
五、使用教程
使用教程https://www.flysnow.org/2018/07/29/from-hexo-to-hugo.html
使用教程 https://blog.csdn.net/weixin_30952535/article/details/97155453
主題説明 https://github.com/JokerQyou/maupassant-hugo/blob/master/README_zh.md
主題説明 https://github.com/flysnow-org/maupassant-hugo
參考文章 https://blog.csdn.net/codingriver/article/details/107718847