Skip to main content

A terminal-style static site generator designed for writing technical blogs

Project description

wilton

wilton.png

为撰写技术博客设计的终端风格的静态站点生成器

访问量统计和评论区服务目前用的是腾讯的 EdgeOne, 之后会加入更多平台的支持

使用方法

pip 安装

pip install wilton
wilton --src="你的博客源码目录" --dist="输出目录"

uv 安装

uv tool install wilton
uvx wilton --src="你的博客源码目录" --dist="输出目录"

部分外观展示

主页

img1

文章阅读页面

img2

目前 wilton 支持所有 CommonMark 语法

额外支持:

  • 表格
  • github alert 消息
  • latex 公式
  • 高亮文本
  • 脚注
  • 任务列表

搜索页

img3

构建流程

目前的构建流程是这样的:

  1. 初始化数据库与模型
  2. 解析用户输入
  3. 读取配置文件
  4. 导入依赖配置但与博客内容无关的资产
    1. css/js/fonts 主题文件和 attachments 目录
    2. 图标
    3. 云函数
  5. 扫描博客文件夹 一边扫描一边构建数据库
  6. 编译文章与页面
  7. 根据数据库生成构建产物
    1. 生成导航栏
    2. 生成侧边栏
    3. 生成文章
    4. 生成页面
      1. 自定义页面
      2. 友情链接页面
      3. 搜索页
    5. 生成文章列表
    6. 网站地图
  8. 编译静态索引

TODO

计划加入的功能 (顺序不代表优先级):

  • 构建缓存与增量编译
  • 切换颜色主题; 毕竟是终端风格, 理论上用一个类似 Color Scheme 的机制就能实现这一点
  • 支持更多部署平台
    • cloudflare pages
    • vercel
    • 个人服务器, 基于 nginx + fastapi
  • 支持 mermaid 图表
  • 完善的使用文档与二次开发文档
  • 并行化构建, 加快构建速度
  • i18n

如有其他您期望的功能, 可以在 issue 中留言

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wilton-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wilton-0.1.0-py3-none-any.whl (582.9 kB view details)

Uploaded Python 3

File details

Details for the file wilton-0.1.0.tar.gz.

File metadata

  • Download URL: wilton-0.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for wilton-0.1.0.tar.gz
Algorithm Hash digest
SHA256 973dd4ae2f44bcee3b078254f9e5dfd493357c218ce3f3f1b3d4bff0e7f26f82
MD5 1630c463df73e11167409be6275904aa
BLAKE2b-256 81bf02993b0588329c1ee9e3f6b69da21016310114f7f0245c36e59d7c39fb86

See more details on using hashes here.

File details

Details for the file wilton-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wilton-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 582.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for wilton-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cd8f9f728fe6b464e28644cffe1dbf0f68c40dd89b9f107dfbd43294aaab634
MD5 e368d3f83a49cabb2dbf26aca6f9396c
BLAKE2b-256 0419aefc101cb3b5d76ac8c885ae11714eefbe645f619122f78ef5dd8492a284

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page