基于 GitHub Action + GitHub Pages + Docsify 的全自动知乎热榜备份

2021-12-26 22:34:19 +08:00
 JustSong

描述

每日自动备份知乎热榜,生成 Markdown 文件,并构建静态网站。

在线预览: https://zhihu.justsong.cn/

仓库地址: https://github.com/songquanpeng/zhihu-archiver

Fork 示例仓库地址: https://github.com/justsong-lab/zhihu-archiver

部署

部署方式 #1:GitHub Action + GitHub Pages

  1. 首先 fork 本项目;
  2. 之后去 Actions 页面启动 workflow 。
  3. 去仓库设置页面启用 GitHub Pages ,选择 master 分支下的 docs 目录。

部署方式 #2:自己的服务器 + GitHub Pages

  1. 首先 fork 本项目;
  2. 之后在你的服务器下 clone 你的 fork ,并进入项目目录;
  3. 配置 Python 环境并安装依赖:
    sudo apt install python-is-python3 python3-pip
    pip install -r requirements.txt
    
  4. 给脚本执行权限:chmod u+x ./update.sh
  5. 之后设置 crontab 如下:
    0 18 * * * cd /path/to/zhihu-archiver && ./update.sh
    
  6. 再之后去仓库设置页面启用 GitHub Pages ,选择 master 分支下的 docs 目录。
1650 次点击
所在节点    分享创造
4 条回复
jaded
2021-12-26 22:41:06 +08:00
牛逼
tousfun
2021-12-27 14:56:10 +08:00
有没有备份自己收藏的网页的库?
JustSong
2021-12-27 15:14:21 +08:00
@919615766 不清楚,我一般直接用 OneNote 备份网页(提取其中的文章内容)
gearkey
2021-12-29 11:44:51 +08:00
支持,好东西

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/824562

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX