Blog

Hugo快速开始(Windows)

安装Chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

安装Hugo

choco install hugo-extended

创建站点

hugo new site blog

添加主题

cd blog
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> hugo.toml

添加内容

hugo new posts/my-first-post.md

启动Hugo服务器(预览内容)

hugo server --buildDrafts

生成静态站点

hugo --buildDrafts

生成的静态站点在public目录下。