Overview
The hugo-leetcode-dashboard is a plugin that generates a LeetCode answer board and supports easy deployment to a Hugo website. It allows users to keep a complete record of their coding journey and provides a preview demo for reference.
Features
- Answer Overview: Provides an overview of completed and in-progress questions.
- Personal Answer Board: Displays question number, title, favorite tags, answer language, question acceptance rate, difficulty, and type.
- Question Description Display: Shows the description of each question.
- Personal Solutions: Allows users to display their own solutions.
Installation
To install the hugo-leetcode-dashboard, follow these steps:
Download the repository to your local machine.
Install the dependencies by running the following commands:
pip install requests pip install aiohttp
Update the
config.json
file in the root directory of the repository:- Set the
username
to your LeetCode-cn account. - Set the
password
to the corresponding password of your account. - Set the
outputDir
to the desired path for generating the dashboard (e.g.,/Users/XXX/my_blogs/content
).
- Set the
Since Hugo only supports Markdown documents by default, create a new file
layouts/shortcodes/rawhtml.html
in the root directory of your personal website, to enable support for raw HTML. (Refer to the provided link for more details.)Finally, deploy the hugo-leetcode-dashboard to your Hugo website using the following commands:
# Deploy to Hugo website hugo-leetcode-dashboard deploy
Summary
The hugo-leetcode-dashboard is a powerful plugin that simplifies the process of generating and deploying a LeetCode answer board on a Hugo website. It allows users to keep track of their coding progress, view questions and their descriptions, and display their own solutions. With easy installation steps and a user-friendly interface, this plugin is a valuable tool for anyone using Hugo for their coding blog or personal website.