HUGO 食用系列(二)

修改目录结构: 完成初始化 HUGO 后,生成默认的目录结构为: my-site/ ... └── hugo.toml <-- 站点配置文件 为了使目录看起来清爽一些,创建一个父文件夹 config 和一个子文件夹 _default 并把所有的配置文件放在该目录中: my-site/ ... ├── config/ <-- 站点配置文件 │ └── _default/ │ └── hugo.toml ... 站点配置文件 HUGO 完成初始化后默认创建的站点 hugo.toml 只有三行配置: baseURL = 'https://example.org/' languageCode = 'en-us' title = 'My New Hugo Site' 后续对站点设置时会添加更多的配置项,以 PaperMod 主题的部分配置为例: baseURL = 'https://example.org/' languageCode = 'en-us' title = 'My New Hugo Site' theme = 'PaperMod' enableEmoji = true [markup] [markup.goldmark] [markup.goldmark.renderer] unsafe = true [params] DateFormat = '2006-01-02' defaultTheme = 'auto' # defaultTheme = 'light' # defaultTheme = 'dark' ShowWordCount = true ShowReadingTime = true ShowPostNavLinks = true ShowCodeCopyButtons = true ShowAllPagesInArchive = true [params....

2024-01-28 · 2 min · 318 words · ILUNP

HUGO 食用系列(一)

采用 Hugo(Extended) + Github Pages + Github Action 部署方案。 优雅的在 Windows 中安装 HUGO 环境: 现在可以使用 WinGet 包管理器来安装 HUGO 所需的基础环境,只需要在终端(PowerShell)中分别运行以下命令,等待片刻即可: # 安装 Hugo Extended winget install Hugo.Hugo.Extended # 安装 Git winget install -e --id Git.Git 安装 Github Desktop 方便文件更改前后的对比,当然 VSCode 也可以做到这些。 # 安装 Github Desktop winget install -e --id GitHub.GitHubDesktop 如果遇到问题,请确认您使用的 Windows 版本安装了 WinGet 包管理器。 如果没有安装 WinGet 包管理器,请立刻使用传统方法安装 HUGO 环境,不值得过多纠结。 为 HUGO 创建 Github Pages 仓库: 在 Github 中创建一个名为 <username>.github.io 的存储库。...

2023-11-24 · 2 min · 274 words · ILUNP

HUGO

The world’s fastest framework for building websites Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. Hello World New Beginning,new life…

2023-11-10 · 1 min · 35 words · ILUNP