* docs: translate README to English in homepage * feat(docs): update hero-text in README * docs: add readme_en * feat(docs): add language jump in readme * docs: update readme layout * feat(docs): add CONTRIBUTION_EN and jump link * docs: translate theme introduction * docs: upgrade version to 135 , create 2 file * docs: add icon, fix translation errors in intro, translate quick-start * docs: translate quick start - write * docs: fix jump link in write * docs: translate document in quick start * docs: translate international in quick start * docs: translate deployment in quick start * docs: translate optimize-build in quick start --------- Co-authored-by: pengzhanbo <volodymyr@foxmail.com>
2.8 KiB
Contribution Guide
Overview
The project repository uses pnpm workspaces to implement a Monorepo, which stores multiple interrelated independent Packages.
- The theme is developed and maintained in the
themedirectory. - Plugins are developed and maintained in the
pluginsdirectory. - Documentation is developed and maintained in the
docsdirectory.
In the plugins directory:
plugin-content-update: Rewrites theContentcomponent and provides theonContentUpdatedhook.plugin-search: Provides full-text fuzzy search functionality for the theme.plugin-shikiji: A code highlighting plugin that supports highlight, diff, focus, and error level.plugin-md-power: Provides enhanced markdown features.
Development Configuration
Development requirements:
Clone the repository and install dependencies:
pnpm install
Before starting the development service for the first time, build the source code:
pnpm build
Main Tools
- TypeScript as the development language.
- ESLint for code checking and formatting.
- StyleLint for code checking and formatting.
Scripts
pnpm build
The build command uses tsc to compile the source code into .js files in the lib directory. It also copies resources that do not need to be compiled to the corresponding lib directory.
After cloning the repository, you need to run this command first to ensure that the project code can run smoothly, as the compiled output directory is excluded from the repository by .gitignore.
pnpm dev
The dev command starts two services locally. One runs the tsup:watch & copy:watch for the theme directory, and the other runs the vuepress development service for the example docs directory.
By default, all plugins under the plugins directory do not have a dev command. Therefore, changes to the plugins directory may require running the pnpm build command to rebuild. Some changes to the plugins/**/node directory require re-running pnpm dev to take effect.
pnpm lint
The lint command uses ESLint to check all source files.
When lint reports errors, you can manually modify the source code to fix the ESLint errors, or run pnpm lint:fix to automatically fix them.
pnpm test
The test command uses Vitest to run all tests.
IDE Support
It is recommended to use vs code for development. This repository is configured with the recommended vs code extensions for developing this theme. When you import this repository, vs code may recommend that you install some extensions.