Documentation Collaboration
Note
commit message etc. content not repeated, please check Collaboration Documentation
Reasons for Modifying Content
If actual functionality does not match documentation description, please modify documentation description, not modify code.
Note
Cannot modify code, only can modify content, and need to ensure modified content matches actual.
Also can be you want to modify typos, add new description
Or documentation not updated in time, but this way you suggest first submit an issue.
Modification Methods
If you only want to modify one document, you can directly click Edit this page below document page to modify
But if you want to modify many documents, you need to download repository then modify.
Note
If want to modify content, need to submit PR not directly merge.
Local Configuration
Install Environment
First you need to install git, Chinese users open [this link]https://cn-git.com/, foreign users please search yourself. You also need to install nodejs, open this link
Configure npm
npm is Node.js package management tool, we need to configure npm to use it.
Create Folders
Open your Node.js installation directory (e.g. D:\software\nodejs, following examples use this), manually create two folders:
node_global
node_cacheExecute Configuration Commands
In terminal, execute following two commands in order (note replace with your actual path):
npm config set prefix "D:\software\nodejs\node_global"
npm config set cache "D:\software\nodejs\node_cache"Configure Environment Variables
If not configure this, later you use npm install -g installed tools will prompt "command not found".
- On desktop right click "This PC" -> "Properties" -> "Advanced system settings" -> "Environment Variables".
- Modify
Pathin 【System Variables】: - Find
Pathvariable, click "Edit".
- Find
- Check if have default C drive npm path, if yes, delete it.
- Create new one, fill your Node.js installation path:
D:\software\nodejs\.
- Create new one, fill your Node.js installation path:
- Create/Modify Path in 【User Variables】:
- In 【User Variables】 find Path, click "Edit".
- Change default
C:\Users\username\AppData\Roaming\npmto:D:\software\nodejs\node_global.
- Change default
Tip
If don't have this C:\Users\username\AppData\Roaming\npm, create new one, fill your Node.js installation path.
- Create
NODE_PATHvariable: - In 【System Variables】 area, click "New".
- Variable name:
NODE_PATH
- Variable name:
- Variable value:
D:\software\nodejs\node_global\node_modules
- Variable value:
- Click OK save all windows.
Configure Mirror (For Chinese Developers)
Default npm source is abroad, download speed slow. We configure Taobao latest mirror source, in terminal input:
npm config set registry https://registry.npmmirror.comVerify if configuration successful:
npm config get registryIf returns https://registry.npmmirror.com/, indicates speed up successful.
Clone Repository
You need create fork on github, then clone to local:
You can use git clone https://github.com/username/clickmouse_docs.git download source code to local
Run npm install in administrator terminal to install dependencies.
Publish and Submit
You need create new branch:
git checkout -b my-branchAnd create remote link:
git remote add origin https://github.com/username/clickmouse_docs.gitConfigure your email and username:
git config --global user.email "your email"
git config --global user.name "your name"Then, you can submit.
When publishing, may need your username and password, so you need set a key on github.
- Set name and expiration time, in
Repository accessselect All repositories, - Click
Add permissons, selectContents,Contentscheckbox selectRead and write, then selectworkflows, confirm.
Then, you can publish.
Submit PR
You need create Pull request on this link, then wait for review.
Click to understand PR specifications
Open this link
Compile and Debug
Can run npm run dev open compilation environment, open webpage according to prompt.
Run npm run build compile script, can put in /clickmouse_docs/ directory to deploy.
Note
But we will automatically deploy each commit to main branch, so you don't need compile yourself.