Skip to main content
Version: 4.3

Editing docs

Prerequisites

To clone and build the website all you need is git, and npm or yarn.

Start by cloning a fork of the Onion repository:

git clone https://github.com/YOUR-USERNAME/Onion.git

Go to the website directory:

cd Onion/website

Use your preferred package manager to install the dependencies:

npm install

Serving the website locally

To instantly preview your changes on save, you can serve the website locally using this command:

npm start

Editing content

Now you're ready to start editing the docs! Open the website/docs directory (or any of the markdown files inside) in your favorite text editor, for example Visual Studio Code:

code docs/

Notes on the file structure

The markdown files inside the docs directory each represent a page on the website. These are divided into categories and subcategories. The number prefixes on the categories and pages decides the order in which they are shown in the sidebar.

Some of the markdown files are using the .mdx extension, these have simply been supercharged with support for MDX (Markdown + React) syntax.

Some of the subcategories contain an index.md or index.mdx file, these represent the main landing page for each subcategory.

Propose changes via a Pull Request (PR)

Push your changes to a fork of the Onion repo and create a PR to the main repo.

Read more about collaborating with pull requests here.