下载博客程序
配置环境变量PATH
E:\software\hugo
新建一个博客网站
hugo new site myblog
出现如下信息就是搭建成功了
Congratulations! Your new Hugo site is created in E:\hugo_test\myblog.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/ or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
启动博客
hugo server -D
访问 http://localhost:1313/
由于没有主题,所以我们打开我们的网站什么都看不到。
安装主题
下载地址
这里选择一款自己比较喜欢的主题,我这里找一款我下载下开的主题作为实例安装一下
- 将文件夹名称改成
potato-dark - 复制主题里面
exampleSite里面的内容到博客根目录,直接覆盖粘贴就可以,注意这里的文件夹名称要和exampleSite下面config.tomltheme下面的值一样。 - 重新启动博客
hugo server -D - 访问 http://localhost:1313/ ,可以看到博客已经搭建好了
如何新建一篇文章
hugo new posts/mynewblog.md
如果这篇文章对您很有帮助,不妨
----- 本文结束 ❤ 感谢您的阅读 ----
下一篇
Go语言环境搭建及常用操作
- 本文作者: Memory
- 本文链接: https://www.mzpkz.top/post/2020-02-08/
- 版权声明: 本博客所有文章除特别声明外,转载请注明出处!