docs.waku.org/README.md

97 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2023-06-14 00:26:55 +00:00
# Waku Documentation Portal
2022-07-29 05:46:00 +00:00
2023-06-14 00:26:55 +00:00
[![Waku Documentation Portal](https://img.shields.io/badge/docs.waku.org-black)](https://docs.waku.org/)
2022-07-29 05:46:00 +00:00
2023-06-14 00:26:55 +00:00
The Waku Documentation Portal can be accessed at <https://docs.waku.org/> and was built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
2022-07-29 06:12:02 +00:00
2023-05-04 03:56:25 +00:00
## Prerequisites
- [Node.js](https://nodejs.org/en/)
- [yarn](https://yarnpkg.com/en/)
## Installation
Clone this repository:
2022-07-29 06:12:02 +00:00
2023-11-23 11:01:32 +00:00
```shell
2023-06-14 00:26:55 +00:00
git clone https://github.com/waku-org/docs.waku.org
2023-05-04 03:56:25 +00:00
```
Install the dependencies:
2023-11-23 11:01:32 +00:00
```shell
2023-05-27 06:45:58 +00:00
yarn
# or
2023-05-04 03:56:25 +00:00
yarn install
2022-08-04 11:42:53 +00:00
```
2023-05-04 03:56:25 +00:00
## Running Locally
2023-11-23 11:01:32 +00:00
```shell
yarn start # Run 'node fetch-content.js' in the root directory to fetch remote files
2022-08-04 11:42:53 +00:00
```
2022-07-29 06:12:02 +00:00
2023-05-14 05:08:18 +00:00
Check for spelling errors before deploying:
2023-11-23 11:01:32 +00:00
```shell
2023-05-23 11:50:55 +00:00
yarn check:spell
```
Create a production build locally to check for errors:
2023-11-23 11:01:32 +00:00
```shell
yarn build # Runs 'node fetch-content.js' and then 'docusaurus build'
# The 'fetch-content.js' script fetches documents from the nwaku and research repositories.
2023-05-23 11:50:55 +00:00
2023-05-25 15:39:25 +00:00
# test the build
2023-05-23 11:50:55 +00:00
yarn serve
2023-05-14 05:08:18 +00:00
```
feat: use Logos theme & plugin (#33) * Use Logos plugins and theme. * Upgrade dependencies. * feat: improvements on docs (#24) * add: security features * add: protocols overview by example * add: different protocols * add: spell check on CI * rm: yarn.lock to avoid inconsistencies * Update docs/Concepts/1.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * convert mscgen sequence to mermaid * partially adress review comments * address: comments * fix: ci * chore: address minor typos/changes in docs * add: pros/cons for discv5 and peer-exchange * fix: minor typo * chore: address refactoring Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * chore: refactor ordering/naming of markdown files (#29) * chore: rename md files and use config ordering it is unfeasible to track the changes in files labelled as '1.md', '2.md', etc and way easier when the files are named after their contents. * fix: hint box render * fix: markdown links * finish merge * push yarn.lock Co-authored-by: Hossein Mehrabi <ohyeaross@gmail.com> Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
2023-01-23 09:37:39 +00:00
## Configuration
2023-05-04 03:56:25 +00:00
Edit the `docusaurus.config.js` file located in the repository's root directory, and update the `businessUnit` field within the presets section. Here is a list of valid values for this field:
feat: use Logos theme & plugin (#33) * Use Logos plugins and theme. * Upgrade dependencies. * feat: improvements on docs (#24) * add: security features * add: protocols overview by example * add: different protocols * add: spell check on CI * rm: yarn.lock to avoid inconsistencies * Update docs/Concepts/1.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * convert mscgen sequence to mermaid * partially adress review comments * address: comments * fix: ci * chore: address minor typos/changes in docs * add: pros/cons for discv5 and peer-exchange * fix: minor typo * chore: address refactoring Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * chore: refactor ordering/naming of markdown files (#29) * chore: rename md files and use config ordering it is unfeasible to track the changes in files labelled as '1.md', '2.md', etc and way easier when the files are named after their contents. * fix: hint box render * fix: markdown links * finish merge * push yarn.lock Co-authored-by: Hossein Mehrabi <ohyeaross@gmail.com> Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
2023-01-23 09:37:39 +00:00
- Logos
- Codex
- Waku
Example:
2023-05-04 03:56:25 +00:00
feat: use Logos theme & plugin (#33) * Use Logos plugins and theme. * Upgrade dependencies. * feat: improvements on docs (#24) * add: security features * add: protocols overview by example * add: different protocols * add: spell check on CI * rm: yarn.lock to avoid inconsistencies * Update docs/Concepts/1.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * convert mscgen sequence to mermaid * partially adress review comments * address: comments * fix: ci * chore: address minor typos/changes in docs * add: pros/cons for discv5 and peer-exchange * fix: minor typo * chore: address refactoring Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * chore: refactor ordering/naming of markdown files (#29) * chore: rename md files and use config ordering it is unfeasible to track the changes in files labelled as '1.md', '2.md', etc and way easier when the files are named after their contents. * fix: hint box render * fix: markdown links * finish merge * push yarn.lock Co-authored-by: Hossein Mehrabi <ohyeaross@gmail.com> Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
2023-01-23 09:37:39 +00:00
```js
presets: [
[
'@acid-info/logos-docusaurus-preset',
{
2023-05-04 03:56:25 +00:00
businessUnit: 'Waku',
feat: use Logos theme & plugin (#33) * Use Logos plugins and theme. * Upgrade dependencies. * feat: improvements on docs (#24) * add: security features * add: protocols overview by example * add: different protocols * add: spell check on CI * rm: yarn.lock to avoid inconsistencies * Update docs/Concepts/1.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * convert mscgen sequence to mermaid * partially adress review comments * address: comments * fix: ci * chore: address minor typos/changes in docs * add: pros/cons for discv5 and peer-exchange * fix: minor typo * chore: address refactoring Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * chore: refactor ordering/naming of markdown files (#29) * chore: rename md files and use config ordering it is unfeasible to track the changes in files labelled as '1.md', '2.md', etc and way easier when the files are named after their contents. * fix: hint box render * fix: markdown links * finish merge * push yarn.lock Co-authored-by: Hossein Mehrabi <ohyeaross@gmail.com> Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
2023-01-23 09:37:39 +00:00
},
],
],
2022-08-04 11:42:53 +00:00
```
2023-05-04 03:56:25 +00:00
This should suffice since Logos plugins will handle other configurations linked to the designated business unit. However, if you encounter any inaccuracies in the data provided by Logos Plugins, please visit the [Logos Docusaurus Plugins](https://github.com/acid-info/logos-docusaurus-plugins) page and submit an issue.
feat: use Logos theme & plugin (#33) * Use Logos plugins and theme. * Upgrade dependencies. * feat: improvements on docs (#24) * add: security features * add: protocols overview by example * add: different protocols * add: spell check on CI * rm: yarn.lock to avoid inconsistencies * Update docs/Concepts/1.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/2.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * Update docs/Concepts/7.md Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * convert mscgen sequence to mermaid * partially adress review comments * address: comments * fix: ci * chore: address minor typos/changes in docs * add: pros/cons for discv5 and peer-exchange * fix: minor typo * chore: address refactoring Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * chore: refactor ordering/naming of markdown files (#29) * chore: rename md files and use config ordering it is unfeasible to track the changes in files labelled as '1.md', '2.md', etc and way easier when the files are named after their contents. * fix: hint box render * fix: markdown links * finish merge * push yarn.lock Co-authored-by: Hossein Mehrabi <ohyeaross@gmail.com> Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
2023-01-23 09:37:39 +00:00
## Customisation
2022-08-04 11:42:53 +00:00
You can find the instructions on adding more documentation sections, localisation, and versioning on the [Docusaurus](https://docusaurus.io/docs) website.
> Note that theme customisation is limited; for further instructions on customizing your theme, head over to [Logos Docusaurus Theme](https://github.com/acid-info/logos-docusaurus-plugins/tree/main/packages/logos-docusaurus-theme/).
2023-05-04 03:56:25 +00:00
## Troubleshooting
Docusaurus depends heavily on caching to enhance site performance. If you make changes that do not appear in the portal, try clearing the cache by running:
2023-11-23 11:01:32 +00:00
```shell
2023-05-04 03:56:25 +00:00
yarn clear
```
## CI/CD
- [CI builds](https://ci.infra.status.im/job/website/job/docs.waku.org/) `master` and pushes to `deploy-master` branch, which is hosted at <https://docs.waku.org/>.
- [CI builds](https://ci.infra.status.im/job/website/job/dev-docs.waku.org/) `develop` and pushes to `deploy-develop` branch, which is hosted at <https://dev-docs.waku.org/>.
The hosting is done using [Caddy server with Git plugin for handling GitHub webhooks](https://github.com/status-im/infra-misc/blob/master/ansible/roles/caddy-git).
Information about deployed build can be also found in `/build.json` available on the website.