Migrate from VuePress to VitePress with enhancements and fixes#7
Merged
Migrate from VuePress to VitePress with enhancements and fixes#7
Conversation
- Replace VuePress 1.x with VitePress 1.6 - Create custom sidebar generator to replace vuepress-bar plugin - Update homepage frontmatter to VitePress format - Optimize GitHub Actions workflow (pnpm cache, concurrency, frozen-lockfile) - Switch CI trigger branch from master to main - Update .gitignore, .prettierignore and eslint config for VitePress Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix sidebar: extract Chinese titles from markdown headings instead of filenames - Fix homepage 404: rename README.md to index.md for VitePress compatibility - Fix theme: override brand colors to match VuePress green theme (#3eaf7c) - Fix outline: configure heading extraction for chapter navigation - Enhance homepage: add hero section, feature cards, topic index and category stats - Update site title to 'LeetCode 通关手册'
- Add ci.yml: lint, typecheck, format check, and test on push/PR - Refactor main.yml: use actions/deploy-pages instead of third-party action - Declare minimal permissions for both workflows - Use node-version-file instead of hardcoded version
…ion body - Export deserialize and serialize functions from src/utils/tree.ts - Add placeholder return in 815.公交路线.ts to fix missing return error
- Revert serialize/deserialize exports (they are internal to tree.ts) - Remove unnecessary import in 199.二叉树的右视图.ts, use global Tree.deserialize
- Run prettier on all 232 unformatted files to pass format:check - Add preview.yml workflow for Netlify deploy previews on PRs
The glob 'src/**/*.{js,ts}' matches .d.ts files on Linux but not
on Windows, causing CI-only lint failures for no-explicit-any in
global-utils.d.ts. Adding '**/*.d.ts' to ESLint ignores resolves
the cross-platform inconsistency.
- Add .gitattributes forcing LF for all text files - Re-normalize 80 files from CRLF to LF in git index
…ttps://github.com/realDuang/leetcode-in-javascript into copilot-worktree-2026-03-01T08-40-29 # Conflicts: # .vscode/launch.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request migrates the documentation system from VuePress 1.x to VitePress, modernizing the docs, build process, and deployment workflow. The migration includes replacing configuration files, updating scripts and dependencies, customizing the theme, and improving sidebar generation. Several related code and workflow updates are also included.
Migration from VuePress to VitePress:
Removed all VuePress-specific files and dependencies, including
vuepress,vuepress-bar, and the old config indocs/.vuepress/config.ts. Added new VitePress dependencies and configuration files (vitepress,docs/.vitepress/config.mts,docs/.vitepress/sidebar.ts,docs/.vitepress/theme/index.ts, anddocs/.vitepress/theme/custom.css). [1] [2] [3] [4] [5] [6] [7] [8]Updated documentation entry point: replaced the old
docs/README.md(VuePress home) with a newdocs/index.mdusing VitePress frontmatter and home layout, including a new hero section and feature descriptions. [1] [2]Build, Deployment, and Linting Updates:
Updated the GitHub Actions workflow to use the
mainbranch, upgraded actions to latest versions, switched to Node.js 20, and changed the build and deploy steps to use VitePress output (docs/.vitepress/dist). Added concurrency control to deployments.Updated npm scripts to use VitePress commands for development, build, and preview. Adjusted lint scripts to include new config and sidebar files.
Updated
.prettierignoreand ESLint config to ignore new VitePress build/cache folders. [1] [2]Sidebar and Theme Improvements:
Replaced sidebar generation logic: removed the old bar-based system and added a new TypeScript-based sidebar generator for VitePress, supporting category titles and markdown heading extraction for sidebar display.
Added a custom theme for VitePress to match the previous VuePress green theme and improved the homepage layout and table styles. [1] [2]
Minor Documentation Improvements:
VuePress → VitePress migration:
docs/README.mdwith a new VitePressdocs/index.mdhome page. [1] [2]Build and deployment updates:
Sidebar and theme improvements:
Documentation improvements: