More Premium Hugo Themes Premium Hugo Themes

Hugo Leetcode Dashboard

A LeetCode dashboard for hugo website

Hugo Leetcode Dashboard

A LeetCode dashboard for hugo website

Author Avatar Theme by lryong
Github Stars Github Stars: 156
Last Commit Last Commit: May 19, 2022 -
First Commit Created: Dec 18, 2023 -
default image

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:

  1. Download the repository to your local machine.

  2. Install the dependencies by running the following commands:

    pip install requests
    pip install aiohttp
    
  3. 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).
  4. 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.)

  5. 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.