Skip to content

Commit

Permalink
wiki: Add building wiki guide
Browse files Browse the repository at this point in the history
Change-Id: I40ffd8dcbabc07f1c546151e26e6c5deca74dd93
  • Loading branch information
neroices committed Dec 25, 2024
1 parent b79174c commit beec442
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export default defineConfig({
collapsed: false,
items: [
{ text: "Building WitAqua", link: "/developers/building" },
{ text: "Adding Your Device to WitAqua OTA", link: "/developers/adding-ota" }
{ text: "Building WitAqua Wiki", link: "/developers/building-wiki" },
{
text: "Adding Your Device to WitAqua OTA",
link: "/developers/adding-ota",
},
],
},
],
Expand Down
70 changes: 70 additions & 0 deletions developers/building-wiki.md
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
```

0 comments on commit beec442

Please sign in to comment.