一个功能丰富的个人博客模板,基于 Zola 静态站点生成器构建。
- 📝 多种内容类型:文章、想法、诗歌、故事、翻译、引用等
- 🏷️ 完整的分类系统:标签和分类支持
- 🔍 搜索功能:可选的Meilisearch搜索集成
- 📱 响应式设计:适配各种设备
- 🎵 音频播放器:支持音频内容嵌入
- 🔄 自动化同步:从Apple备忘录自动同步内容
- 🐘 社交媒体集成:支持Mastodon自动发布
- 🚀 自动部署:GitHub Actions自动构建部署
git clone <your-repo-url>
cd <your-repo-name># 给脚本执行权限
chmod +x init-template.sh
# 运行初始化脚本
./init-template.sh编辑 config.toml 文件,修改以下信息:
base_url = "https://yourdomain.com"
title = "Your Blog Title"
description = "Your blog description"
[extra]
author = "Your Name"
email = "your.email@example.com"make installmake serve访问 http://localhost:1111 查看你的博客。
使用内置的脚本快速创建各种类型的内容:
# 添加短想法
./scripts/blog-helper.sh thought "你的想法内容"
# 创建新文章
./scripts/blog-helper.sh create "blog" "文章标题"
# 创建诗歌
./scripts/blog-helper.sh create "poem" "诗歌标题"如果你使用macOS,可以设置从Apple备忘录自动同步内容:
# 安装依赖
./scripts/setup-dependencies.sh
# 设置自动同步
./scripts/blog-helper.sh auto-sync install支持的标签类型:
#thought- 短想法#日记- 日记#读书- 读书笔记#诗歌- 诗歌#故事- 故事#技术- 技术文章- 更多标签请查看
multi_tag_config.json
make build- 在GitHub仓库设置中启用GitHub Pages
- 推送代码到main分支,GitHub Actions会自动构建和部署
- 修改
static/CNAME文件 - 在
config.toml中更新base_url
如果需要启用搜索功能,需要配置Meilisearch:
- 部署Meilisearch服务
- 在
config.toml中配置搜索相关设置 - 运行搜索索引构建
配置Mastodon自动发布:
- 创建
.env文件 - 添加Mastodon配置信息
- 启用自动同步
├── content/ # 内容文件
│ ├── blog/ # 博客文章
│ ├── thoughts/ # 短想法
│ ├── poem/ # 诗歌
│ └── ...
├── static/ # 静态资源
├── templates/ # 模板文件
├── scripts/ # 自动化脚本
├── config.toml # 主配置文件
└── init-template.sh # 模板初始化脚本
欢迎提交Issue和Pull Request来改进这个模板。
本项目采用 MIT 许可证。详见 LICENSE 文件。
- Zola - 静态站点生成器
- APlayer - 音频播放器
- Meilisearch - 搜索引擎
如果这个模板对你有帮助,请给个⭐️!