Skip to content

comit-network/comit.network

Repository files navigation

COMIT Website & Developer Hub

This is the source code repository for the https://comit.network website.

If you find any of the content unclear please do a PR, contributions are very welcome.

Installation and Setup

This website is built using Docusaurus 2, a modern static website generator.

This guide outlines how you can contribute by adding pages and updating the COMIT developer hub.

First, fork the website on Github. Then, clone it on your machine:

git clone git@github.com:<your-username>/comit.network.git
cd comit.network
yarn install

Run the website locally by running yarn run start. It should open the site on your browser.

Project Structure

The comit.network directory has the following structure:

docs/
|- getting-started/
|- core-concepts/
  |- atomic-swaps.md
|- tutorials/
  |- how-to-write-your-comit-app.md
|- tools/
  |- comit-js-sdk
    |- v1.0.0 (Autogenerated by documentation.js)

Each page on the site is a Markdown .md file. You can write content using GitHub-flavored Markdown syntax.

Adding a New Page

Create a Markdown file (e.g. hello.md) in the docs/ folder:

id: hello
title: Hello World
---
My new content here..

New markdown files within docs will show up as pages on the website. Links to those documents are created first by using the id in the header of each document. If there is no id field, then the name of the file will serve as the link name.

Note that placing a Markdown file in a subdirectory will add a subpath for that page's URL. For example, the Markdown file docs/core-concepts/atomic-swaps.md will be mapped to localhost:3000/docs/core-concepts/atomic-swaps.

Adding a Page to the Sidebar

Many times, you will want to add a document to a sidebar that will be associated with one of the headers in the top navigation bar of the website.

Within sidebars.js, add the id you used in the document header to existing sidebar/category. In the below case, docs is the name of the sidebar and Getting Started is a category within the sidebar.

{
  "docs": {
    "Getting Started": [
      "getting-started"
    ],
    ...
  },
  ...
}

Advanced Usage

For more information, check out the Docusaurus documentation.