使用Hugo搭建网站并部署到阿里云的ECS
第一部分
文章目录
1. 在本地使用Hugo创建静态网站
相信这一部分在网上可以很容易的搜索到,这里我再啰嗦一遍,如果熟知这一部分,可以跳跃至下一部分阿里云开启ftp、上传网站
本地系统:macOS Catalina 10.15.2
1.1 安装Hugo
比较简单的方法就是使用homebrew安装,没有安装homebrew的可以参考以下网站安装
https://brew.sh/index_zh-cn.html
安装hugo
brew install hugo
确认安装
hugo version
1.2 创建一个新的网站
创建新网址
hugo new site quickstart
ps. 上面演示代码中的quickstart为自定义网站名称
添加一个主题
cd quickstart
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
把主题写入配置文件
echo 'theme = "ananke"' >&g