wilton
为撰写技术博客设计的终端风格的静态站点生成器
访问量统计和评论区服务目前用的是腾讯的 EdgeOne, 之后会加入更多平台的支持
使用方法
pip 安装
pip install wilton
wilton --src="你的博客源码目录" --dist="输出目录"
uv 安装
uv tool install wilton
uvx wilton --src="你的博客源码目录" --dist="输出目录"
部分外观展示
主页
文章阅读页面
目前 wilton 支持所有 CommonMark 语法
额外支持:
- 表格
- github alert 消息
- latex 公式
- 高亮文本
- 脚注
- 任务列表
搜索页
构建流程
目前的构建流程是这样的:
- 初始化数据库与模型
- 解析用户输入
- 读取配置文件
- 导入依赖配置但与博客内容无关的资产
- css/js/fonts 主题文件和 attachments 目录
- 图标
- 云函数
- 扫描博客文件夹 一边扫描一边构建数据库
- 编译文章与页面
- 根据数据库生成构建产物
- 生成导航栏
- 生成侧边栏
- 生成文章
- 生成页面
- 自定义页面
- 友情链接页面
- 搜索页
- 生成文章列表
- 网站地图
- 编译静态索引
TODO
计划加入的功能 (顺序不代表优先级):
- 构建缓存与增量编译
- 切换颜色主题; 毕竟是终端风格, 理论上用一个类似 Color Scheme 的机制就能实现这一点
- 支持更多部署平台
- cloudflare pages
- vercel
- 个人服务器, 基于 nginx + fastapi
- 支持 mermaid 图表
- 完善的使用文档与二次开发文档
- 并行化构建, 加快构建速度
- i18n
如有其他您期望的功能, 可以在 issue 中留言
Release files for wilton 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wilton-0.1.0.tar.gz | 1.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wilton-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / wilton-0.1.0.tar.gz
| Download URL | wilton-0.1.0.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
973dd4ae2f44bcee3b078254f9e5dfd493357c218ce3f3f1b3d4bff0e7f26f82
|
|
BLAKE2b-256 checksum How to use checksums |
81bf02993b0588329c1ee9e3f6b69da21016310114f7f0245c36e59d7c39fb86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / wilton-0.1.0-py3-none-any.whl
| Download URL | wilton-0.1.0-py3-none-any.whl |
|---|---|
| Size | 582.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cd8f9f728fe6b464e28644cffe1dbf0f68c40dd89b9f107dfbd43294aaab634
|
|
BLAKE2b-256 checksum How to use checksums |
0419aefc101cb3b5d76ac8c885ae11714eefbe645f619122f78ef5dd8492a284
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|