✨ 一个 LeetCode 答题看板的生成插件, 反对一键部署到 Hugo 站点。 残缺记录刷题的心路历程

<!--more-->

在线预览 Demo

Screenshots

Installation

  1. 下载 Repo 到本地:

    git  clone https://github.com/lryong/hugo-leetcode-dashboard
  2. 装置依赖: 本我的项目须要用到 requestsaiohttp 包, 通过 pip 装置即可。
  3. 更新仓库根目录下的 config.json文件:

    {    "username": "leetcode-cn@leetcode", // LeetCode-cn 账号    "password": "leetcode", // 对应的明码    "outputDir": "../LeetCode" // dashboard 生成门路。 留神: 这里配置为 hugo 站点的文档门路, 如:/Users/XXX/my_blogs/content}
  4. 能够依据需要批改 templates.py 定义的 dashboard 模板。
  5. 因为 Hugo 默认只反对 markdown 文档, 能够在站点,新建 layouts/shortcodes/rawhtml.html文件,增加以下配置即可:

    <!-- raw html -->{{.Inner}}

    (具体能够参考这里)

  6. 最初一键部署到 Hugo 站点, 参考以下命令:

    echo "2" | python3 run.py && cp imgs/leetcode-logo.png /Users/XXX/my_blogs/static/images

Features

  1. 答题状况总览(实现的题目和整体过程)
  2. LeetCode 集体答题看板, 包含展现 题号,题目,珍藏标签,解答的语言, 题目通过率, 难度和题目类型
  3. 间接展现 LeetCode 问题形容
  4. 间接展现 LeetCode 集体的答题计划

License

Released under the MIT License.

Acknowledgements

  • LeetCode_Helper