Skip to content

Commit

Permalink
Added README page to the guide with instructions. Fix index page (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
andynog committed Jan 27, 2021
1 parent d0ecb5e commit d135e7c
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
59 changes: 59 additions & 0 deletions guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Relayer CLI Guide

In order to build and view the Relayer CLI guide you need to instal [`mdBook`](https://github.com/rust-lang/mdBook).

mdBook is a utility to create modern online books from Markdown files.

### Pre-requisites

Install `mdBook` using [`cargo`](https://doc.rust-lang.org/cargo/):

```bash
cargo install mdbook
```

You also need to install the mdbook plug-in for [`mermaid`](https://mermaid-js.github.io/mermaid/#/) to generate graphs and diagrams:

```bash
cargo install mdbook-mermaid
```

### Building and viewing the guide locally

In order to build and view the guide on your local machine, please follow this instructions.

#### Change to the `guide` dir

This assumes your current dir is the `ibc-rs` repository

```bash
cd guide
```

#### Build the guide

To build and view the guide in your browser, run the `mdbook` command below:

```bash
mdbook serve
```

#### View the guide

This will host the guide in your local machine. Open your browser and navigate to:

```bash
http://localhost:3000
```

### Adding or editing new content to the guide

Please check the [mdBook documentation](https://rust-lang.github.io/mdBook/index.html) for additional information on how to add new content to the guide.

Basically if you want to add new content to the guide, just add an entry to the `SUMMARY.md` Markdown file which is the TOC page. Then create a page for the entry you've added to the `SUMMARY.md` page. If you don't create the page, but save the `SUMMARY.md` file and build again, `mdBook` will create the page automatically for you.

#### Local development
If you are adding content using your favorite IDE and have a terminal opened running `mdbook serve`, it provides a convenient watch functionality so any changes detected on local files will trigger another build and if you refresh the guide on your browser they will be shown there.

#### Submit your changes
Once you finish adding the new content just commit your changes (`git commit`) and push them to the respository (`git push`).
4 changes: 2 additions & 2 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# IBC Relayer Guide

---
- [Introduction](./intro.md)
- [What is a relayer?](./relayer_explainer.md)
- [Introduction](./index.md)
- [What is a relayer?](./relayer.md)
- [Getting Started](./getting_started.md)
- [Pre-requisites](./pre_requisites.md)
- [Setup](./setup.md)
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions guide/src/relayer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# What is a relayer?

0 comments on commit d135e7c

Please sign in to comment.