command
module
Version:
v0.0.0-...-4f422af
Opens a new window with list of versions in this module.
Published: Dec 11, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Github Pages 静态化工具 - blogParser
介绍
本工具用于将部署在 Github Pages 的静态博客爬取并保存为静态文件(HTML、CSS、JS、TTF、图片等),以在方便的在云平台使用 Nginx 等静态 Web 服务器进行部署,提高国内主机到站点的访问速度。
软件架构
基于 go 1.16 开发,没有除标准库其他的依赖。本质来说,就是从主页开始,对每个 HTML 的可点击链接、CSS 中引用的资源都进行爬取并递归进行处理,直到所有站内资源都被下载到本地。
使用说明
直接运行 go run blogParser.go
即可,在 main 函数中修改生成资源的位置和需要爬取的 Github Page URL。
TODO
- 使用 goroutine 加速爬取(暂时搁置,云平台单核心运行,且访问外网速度慢,并行不能带来大幅度性能提升)
- Github Webhooks 触发自动解析
- 提供一种机制,使得某些未被修改的资源不用爬取更新,而非每次都将目录整个删除整个网站重新爬取
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.