Hugo 快速入门教程

Hugo 简介 Hugo 是一个用 Go 语言编写的静态网站生成器,以其出色的性能和易用性而闻名。 安装 Hugo Windows 使用 winget 安装(推荐): winget install Hugo.Hugo.Extended macOS 使用 Homebrew 安装: brew install hugo Linux 使用包管理器安装: # Ubuntu/Debian sudo apt install hugo # Arch Linux sudo pacman -S hugo 创建新站点 # 创建新站点 hugo new site myblog # 进入站点目录 cd myblog # 初始化 Git 仓库 git init 安装主题 这里以 PaperMod 主题为例: git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod 配置站点 编辑 hugo.toml 文件: ...

January 20, 2024 · 1 min · Your Name