这是一个基于 Hugo 构建的个人技术博客,使用 Terminal 主题,部署在 GitHub Pages 上。博客专注于技术分享、开发经验和学习笔记。
访问地址: https://ltan.me
💡 About the Author: A tech enthusiast who treats life like debugging code, builds a "digital kingdom" in NAS, contemplates "life algorithms" while swimming, and scripts everything from groceries to daily routines with IT mindset.
- 每日自动换色:通过 GitHub Actions 每天自动更换主题颜色
- 支持颜色:orange、blue、red、green、pink
- 智能算法:基于日期生成,确保同一天颜色一致
- 完美适配桌面端和移动端
- 现代化的终端风格界面
- 优雅的排版和布局
- 支持标签分类和归档
- 自动生成站点地图
- SEO 友好的 URL 结构
- 集成 Utteranc 评论系统
- GitHub 风格的评论界面
- 支持 GitHub 账号登录
- 静态站点生成器:Hugo v0.148.1+
- 主题:Terminal
- 部署平台:GitHub Pages
- 自动化:GitHub Actions
- 评论系统:Utteranc
ltanme.github.io/
├── content/ # 博客文章内容
│ ├── post/ # 文章目录(按年/月组织)
│ ├── about.md # 关于页面
│ └── tags/ # 标签页面
├── themes/ # Hugo 主题
│ └── terminal/ # Terminal 主题文件
├── layouts/ # 自定义布局模板
├── docs/ # 生成的静态文件(GitHub Pages)
├── .github/workflows/ # GitHub Actions 工作流
│ └── daily-color-change.yml # 每日颜色更换
├── config.toml # Hugo 配置文件
└── README.md # 项目说明
-
克隆仓库
git clone https://github.com/ltanme/ltanme.github.io.git cd ltanme.github.io -
安装 Hugo
# macOS brew install hugo # 验证安装 hugo version
-
本地预览
hugo server -D
# 创建文章目录
mkdir -p content/post/$(date +%Y)/$(date +%m)/your-article-title
# 创建文章文件
cat > content/post/$(date +%Y)/$(date +%m)/your-article-title/index.md << 'EOF'
---
title: "文章标题"
date: $(date -u +%Y-%m-%dT%H:%M:%S+08:00)
tags: ["标签1", "标签2"]
featured: false
---
## 介绍
在这里写文章介绍...
## 正文内容
在这里写正文内容...
EOF- baseURL:
https://ltan.me- 网站域名 - ThemeColor: 动态颜色(每日自动更换)
- CenterTheme:
true- 居中布局 - ReadMore:
"Read more"- 阅读更多按钮文本
---
title: "文章标题"
date: 2024-01-02T10:00:00+08:00
tags: ["Java", "Spring Boot", "Docker"]
featured: true # 可选,是否置顶
---通过 GitHub Actions 实现每日自动更换主题颜色:
- 触发时间:每天凌晨 2 点(UTC 时间)
- 支持手动触发:可在 GitHub Actions 页面手动执行
- 颜色算法:基于日期生成,确保同一天颜色一致
- GitHub Actions 自动构建 Hugo 站点
- 生成静态文件到
docs/目录 - 自动提交到 GitHub Pages 分支
- 几分钟内完成部署
- 路径格式:
content/post/年份/月份/文章目录/ - 目录命名:使用英文,kebab-case 格式
- 示例:
content/post/2024/01/solving-https-debugging-issues/
- 文章图片:直接放在文章目录下,与
index.md同级 - 全局图片:放在
docs/images/或docs/img/目录下 - 图片引用:使用相对路径,如

- 使用英文标签
- 标签用双引号包围
- 按重要性排序
- 常见标签:["Java", "Spring Boot", "Docker", "Python", "Linux", "Networking"]
- 域名:https://ltan.me
- GitHub Pages:https://ltanme.github.io
- 部署方式:GitHub Actions 自动部署
- 构建命令:
hugo --baseURL="https://ltan.me"
- 文章数量:297 篇
- 标签数量:100+ 个
- 分页设置:每页 5 篇文章
- 构建时间:约 140ms
欢迎提交 Issue 和 Pull Request!
- Fork 本仓库
- 创建特性分支:
git checkout -b feature/your-feature - 提交更改:
git commit -am 'Add some feature' - 推送分支:
git push origin feature/your-feature - 提交 Pull Request
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
SwimBytes - [email protected]
⭐ 如果这个项目对你有帮助,请给它一个星标!