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
github
account and ensure you have permission to view this project. -
Install
git
locally, with specific instructions varying by operating system. If typinggit
in the command line shows various command descriptions, the installation was successful. -
Use
git clone https://github.com/PolyhedraZK/PolyhedraDocs
to clone the project locally, which will require yourgithub
username and password. If non-ssh
cloning is not allowed, you'll need to configure anssh key
locally, export the public key and store it in yourgithub
account, then usegit clone [email protected]:PolyhedraZK/PolyhedraDocs.git
to clone the project locally, after which you won't need to enter credentials anymore. If you need to usessh
to clone projects for multiple accounts, consider giving eachssh key
an alias, for example using the commandgit clone [email protected]:PolyhedraZK/PolyhedraDocs.git
. -
Install
node
,npm
, andyarn
locally, preferably recent versions. Thenvm
tool is recommended for installation as it's excellent for managingnode
versions. 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.md
file. Before the first run (and after adding any new third-party libraries, though this should rarely happen in this project), enteryarn install
to install all required libraries, then just enteryarn start
to 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 push
to submit. You can then see your branch's update history ongithub
, and create apull request
to 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 request
to 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.