This is the English version. If you want Chinese version, refer to this.
The project is powered by Docusaurus, which is a convenient and fast Node-based framework.
The docs folder is the main part of the project, with its hierarchical structure representing the directory structure. The _category_.json files specify order and display names, otherwise dictionary order is used by default (this can also be implemented within ***.md files); the index.md file is the documentation for the directory itself, if this file doesn't exist then the directory documentation is considered non-existent; the remaining ***.md files contain the content of each document.
The docusaurus.config.ts file contains homepage information, such as titles, buttons, etc.
Other files follow the typescript project structure with no significant differences.
For any steps you're unfamiliar with, feel free to ask ChatGPT.
-
Register a
githubaccount and ensure you have permission to view this project. -
Install
gitlocally, with specific instructions varying by operating system. If typinggitin the command line shows various command descriptions, the installation was successful. -
Use
git clone https://github.com/PolyhedraZK/PolyhedraDocsto clone the project locally, which will require yourgithubusername and password. If non-sshcloning is not allowed, you'll need to configure anssh keylocally, export the public key and store it in yourgithubaccount, then usegit clone [email protected]:PolyhedraZK/PolyhedraDocs.gitto clone the project locally, after which you won't need to enter credentials anymore. If you need to usesshto clone projects for multiple accounts, consider giving eachssh keyan alias, for example using the commandgit clone [email protected]:PolyhedraZK/PolyhedraDocs.git. -
Install
node,npm, andyarnlocally, preferably recent versions. Thenvmtool is recommended for installation as it's excellent for managingnodeversions. Installation instructions depend on your operating system. After successful installation, you can verify each command by typing these words in the command line. -
Enter the project folder, which should be at the same level as the
README.mdfile. Before the first run (and after adding any new third-party libraries, though this should rarely happen in this project), enteryarn installto install all required libraries, then just enteryarn startto launch the service. After a brief wait, the system will automatically open the page in your browser, and you can then browse freely.
-
Using
git: After cloning the project, create your own branch withgit branch <branch-name>, make your changes, add files or folders to be updated usinggit add <file-name>, thengit commit -m "commit reason"andgit pushto submit. You can then see your branch's update history ongithub, and create apull requestto the main branch (or other active branch, depending on your needs) and wait for merge. -
Without using
git: Create your branch directly ongithub, then edit files online or upload local files to submit. Afterward, still create apull requestto the main branch (or other active branch, depending on your needs) and wait for merge.
Regardless of method, it's best to run the project locally to ensure there are no errors.
Additionally, before submitting, it's recommended to use the yarn prettier --write ./ command to beautify the code and maintain consistent style.