Hugo Learning

个人主题配置 概述 这里选用的是 hugo-PaperMod PaperMod 有三种不同的模式(3 Modes): Regular Mode. Home-Info Mode. Profile Mode. 主题安装 安装详细内容可以参考 hugo-PaperMod/wiki/Installation Make sure you install Hugo >= v0.112.4 主题的安装路径:/Users/bingxil/Bob_L_Hugo/themes PaperMode 的安装后的路径:/Users/bingxil/Bob_L_Hugo/themes/PaperMod 如果之前安装了,要重新删除的话,执行如下命令 1 2 3 git submodule deinit -f themes/PaperMod git rm -f themes/PaperMod rm -rf git/modules/themes/PaperMod 安装命令: 1 2 git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically) 最后,还需要在 hugo.yml add: ...

April 21, 2025

Personal Page Build

环境介绍 建站工具:Hugo + Github + Netlify + Aliyun + CloudFlare 电脑环境:MacOS Sonoma (14.3.1) Hugo: Hugo Netlify: Netlify HUGO 安装 准备工作,安装: Git Go Dart Sass 接下来开始正式安装hugo, 使用homebrew进行安装 1 brew install hugo 安装好后查看版本信息 1 hugo version 创建一个 site 1 2 3 4 5 6 hugo new site Bob_L # 创建了一个名为 Bob_L 的 site cd quickstart # 进入 site git init # 初始化 git git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke # 加入你的主题 echo "theme = 'ananke'" >> hugo.toml # 修改成你的主题 hugo server hugo server 之后,通过查看终端的 url 就可以看到你的网页了 注意:这里是使用 submodule ,因为如果使用 clone,可能会出错 加入 content 1 hugo new content posts/my-first-post.md Hugo 会在 content/posts 目录下创建你的 content,最开始在 front matter 中 draft 的值是 true . 默认状态下, Hugo 并不会在建站过程中发布 draft 内容 ...

April 1, 2024