-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I40ffd8dcbabc07f1c546151e26e6c5deca74dd93
- Loading branch information
Showing
2 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Building WitAqua Wiki | ||
## Prerequisites | ||
Before you begin, make sure that you have the following installed: | ||
- **Node.js**: You need Node.js to run the necessary build tools. | ||
- **npm** (Node Package Manager): npm comes with Node.js, and you’ll use it to install dependencies. | ||
|
||
Once these prerequisites are in place, you’re ready to get started. | ||
|
||
## Setup | ||
|
||
Follow these steps to set up your project. | ||
|
||
### 1. Clone the Repository | ||
|
||
Start by cloning the repository to your local machine: | ||
|
||
```bash | ||
git clone "http://gerrit.witaqua.org/wiki" && (cd "wiki" && mkdir -p `git rev-parse --git-dir`/hooks/ && curl -Lo `git rev-parse --git-dir`/hooks/commit-msg http://gerrit.witaqua.org/tools/hooks/commit-msg && chmod +x `git rev-parse --git-dir`/hooks/commit-msg) | ||
``` | ||
If you're using zsh: | ||
```zsh | ||
git clone "http://gerrit.witaqua.org/wiki" && (cd "wiki" && mkdir -p "$(git rev-parse --git-dir)/hooks/" && curl -Lo "$(git rev-parse --git-dir)/hooks/commit-msg" http://gerrit.witaqua.org/tools/hooks/commit-msg && chmod +x "$(git rev-parse --git-dir)/hooks/commit-msg") | ||
``` | ||
|
||
### 2. Install Dependencies | ||
|
||
Install all the required dependencies for the project. | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Local Development | ||
|
||
Once the dependencies are installed, you can start a local development server to preview the site. | ||
|
||
To run the server, use the following command: | ||
|
||
```bash | ||
npm run docs:dev | ||
``` | ||
|
||
::: info | ||
This will start the development server. The server watches for changes, so you’ll see your updates live without needing to manually refresh or restart the server. | ||
::: | ||
|
||
## Building for Production | ||
To build the wiki locally, use the following command: | ||
|
||
```bash | ||
npm run docs:build | ||
``` | ||
|
||
This command will compile the necessary files and generate a static version of the site. | ||
|
||
## Push to Gerrit | ||
Use the following command to push your changes for review: | ||
```bash | ||
git push origin HEAD:refs/for/main | ||
``` | ||
|
||
### Address Feedback | ||
If reviewers request changes, modify your code and amend the commit: | ||
```bash | ||
git commit --amend | ||
``` | ||
Then, push the amended commit: | ||
```bash | ||
git push origin HEAD:refs/for/main | ||
``` |