用 Snap2HTML 和 tree 生成的两种静态文件索引(一份 Python-3.11.4 源代码):
Discussion
Snap2HTML 只支持 Windows, 替代品 LinuxDir2HTML 对特殊字符支持不齐全并且不支持自定义基础路径, 自动化构建还存在问题.
tree 能很好地生成基本的 HTML, 但是有些构建系统没有安装 tree, 可能直接构建不了(Cloudflare Page 使用 v1 构建环境可以使用 tree, v2 不再提供预设框架之外的软件和语言环境).
调整了结构, 添加了第三种实现, 默认为 index.html, 现在有:
- python: https://static-index-demo.pages.dev/index.html
- Snap2HTML: https://static-index-demo.pages.dev/index2.html