https://github.com/beizhedenglong/leetcode-site-generator
Generate your personal LeetCode website with one command!
https://github.com/beizhedenglong/leetcode-site-generator
leetcode leetcode-site leetcode-site-generator leetcode-solutions leetcode-spider
Last synced: 27 days ago
JSON representation
Generate your personal LeetCode website with one command!
- Host: GitHub
- URL: https://github.com/beizhedenglong/leetcode-site-generator
- Owner: beizhedenglong
- License: mit
- Created: 2019-03-25T06:08:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-09T14:29:00.000Z (over 5 years ago)
- Last Synced: 2025-08-20T12:27:36.861Z (7 months ago)
- Topics: leetcode, leetcode-site, leetcode-site-generator, leetcode-solutions, leetcode-spider
- Language: JavaScript
- Homepage:
- Size: 1.2 MB
- Stars: 107
- Watchers: 6
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# LeetCode Site Generator
Generate your personal LeetCode website with one command!
## Example Website
[leetcode-solutions](https://beizhedenglong.github.io/leetcode-solutions/)
[](https://beizhedenglong.github.io/leetcode-solutions/)
## Requirements
- Make sure you have the recent version of [`node.js`](https://nodejs.org) installed.
- [`yarn`](https://yarnpkg.com/en/)(optional), you can use `npm`.
## Features
- Support both `leetcode.com` and `leetcode-cn.com` accounts.
## Installation
`yarn global add leetcode-site-generator` or `npm i -g leetcode-site-generator`
## Usage
1. Run installation script: `leetcode-site init`, This will create a project called `leet-site-base` on your current directory.
2. Go to the `website` directory of `leet-site-base`, run `yarn download`. It will open a popup window and ask you to input your LeetCode username and password.

3. Waiting for downloading process finished, then run `yarn & yarn start`.
## Publish to Github pages
1. Change the following keys in `siteConfig.js`
```js
const siteConfig = {
// ...
url: 'https://beizhedenglong.github.io', // Your website URL
baseUrl: '/leetcode-site-generator/', // Base URL for your project
projectName: 'leetcode-site-generator', // Your project name
organizationName: 'beizhedenglong', // Your github username
// ...
}
```
2. Run `GIT_USER= CURRENT_BRANCH=master USE_SSH=true yarn run publish-gh-pages`
## List of commands
```md
Usage: leetcode-site [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
download [options] Download your new accepted code from LeetCode.
init Generate your personal LeetCode website.
login Log in to your Leetcode account.
logout Log out of current account.
```
### download
```md
Usage: download [options]
Download your new accepted code from LeetCode.
Options:
-a, --all Download all your accepted code from LeetCode.
-h, --help output usage information
```