Skip to content

Commit 9ada487

Browse files
rangulisilseva
authored andcommitted
Add website contributing guide
1 parent cd20b3e commit 9ada487

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

developers_guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
* [Code style guidelines](coding_style.md)
99
* [Peripheral allocation table](peripheral_table.md)
1010
* [OpenRTX Communication Protocol](rtxlink.md)
11+
* [Contributing to the website](website.md)

website.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing to the OpenRTX website
2+
3+
This page discusses the basic setup for contributing to the OpenRTX website.
4+
5+
1. [Overview](#overview)
6+
2. [Installing dependencies](#installing-dependencies)
7+
3. [Obtaining the source code](#obtaining-the-source-code)
8+
4. [Building and running the website](#building-and-running-the-website)
9+
5. [Checking your changes for typos](#checking-your-changes-for-typos)
10+
11+
## Overview
12+
13+
The OpenRTX website is a _static site_. This means that content is pre-built and packaged for viewing in a browser without the need for a complex webserver or database configuration. This makes contributing to the website relatively simple, and only requires installing a few packages, many of which you may already have if you have done any kind of development before.
14+
15+
OpenRTX uses the `docsify` static site generator, which converts convert Markdown files into HTML that can be rendered in a browser. This generated output is hosted on GitHub Pages.
16+
17+
---
18+
19+
## Installing dependencies
20+
21+
In order to build and run the website locally, you must have the following packages installed (this process may be specific to your Linux distribution or operating system):
22+
23+
- `git`
24+
- `nodejs`
25+
- `npm`
26+
27+
Once you have these installed, you will need to use `npm` to install the `docsify` npm package:
28+
29+
```bash
30+
npm i docsify -g
31+
```
32+
33+
You can also install the `cspell` package to check your changes for any spelling errors:
34+
35+
```bash
36+
npm i cspell -g
37+
```
38+
---
39+
40+
## Obtaining the source code
41+
42+
To obtain the source code for the OpenRTX website, clone the GitHub repository using the following command:
43+
44+
```bash
45+
git clone https://github.com/OpenRTX/openrtx.github.io
46+
```
47+
---
48+
49+
## Building and running the website
50+
51+
Once you have cloned the repository, run the following command in the parent directory of the `openrtx.github.io/` repository:
52+
53+
```bash
54+
docsify serve openrtx.github.io
55+
```
56+
In your terminal output you will see the following line:
57+
58+
```bash
59+
Listening at http://localhost:3000
60+
```
61+
62+
Open the URL displayed in the terminal output (typically `http://localhost:3000` by default) to view your locally built version of the OpenRTX website.
63+
64+
You can now make changes to the website by editing any of the Markdown (`.md`) files in the `openrtx.github.io/` directory. When a file is modified and saved, your local version of the website should update automatically and show your changes live without needing to refresh your web browser.
65+
66+
---
67+
68+
## Checking your changes for typos
69+
To check for spelling errors, you can run use the `cspell` command installed earlier. For example, to check for spelling errors in the file you are reading right now, you can run the following command inside the `openrtx.github.io/` directory:
70+
71+
```bash
72+
cspell website.md
73+
```

0 commit comments

Comments
 (0)