Skip to content

Commit

Permalink
Add table of contents to query and tx reference pages (informalsystem…
Browse files Browse the repository at this point in the history
…s#612)

* Fix a couple typos

* Add table of contents to query and tx reference pages
  • Loading branch information
romac authored Feb 5, 2021
1 parent 524d3fe commit b1b9dac
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 12 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,29 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
- name: Setup mdbook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.6"

- name: Setup mdBook-mermaid
- name: Setup mdbook-mermaid
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-mermaid

- run: |
- name: Setup mdbook-toc
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-toc

- name: Build guide
run: |
cd guide
mdbook build
- name: Deploy
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion guide/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ multilingual = false
src = "src"
title = "Hermes (IBC Relayer CLI) Documentation"

[preprocessor]
[preprocessor.mermaid]
command = "mdbook-mermaid"

[preprocessor.toc]
command = "mdbook-toc"
renderer = ["html"]

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
2 changes: 1 addition & 1 deletion guide/src/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format supported for the configuration file is [TOML](https://toml.io/en/).

By default, Hermes expects the configuration file to be located at `$HOME/.hermes/config.toml`.

This can be overriden by supplying the `-c` flag when invoking `hermes`, before the
This can be overridden by supplying the `-c` flag when invoking `hermes`, before the
name of the command to run, eg. `hermes -c my_config.toml query connection channels ibc-1 connection-1`.

> With the exception of the light client configuration, current relayer does not support managing the configuration file programmatically.
Expand Down
2 changes: 1 addition & 1 deletion guide/src/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ hermes -c config_example.toml tx raw conn-init ibc-0 ibc-1 07-tendermint-0 07-te
## Parametrizing the log output level

The relayer configuration file permits parametrization of output verbosity via the knob called `log_level`.
This file is loaded by default from `$HOME/.hermes/config.toml`, but can be overriden in all commands
This file is loaded by default from `$HOME/.hermes/config.toml`, but can be overridden in all commands
with the `-c` flag, eg. `hermes -c ./path/to/my/config.toml some command`.

Relevant snippet:
Expand Down
4 changes: 2 additions & 2 deletions guide/src/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Using the `keys` command you can add and list keys.

#### Show usage

To see the available subcommands for the `keys` command run:
To see the available sub-commands for the `keys` command run:

```shell
hermes help keys
```

Currently there are two subcommands supported `add` and `list`:
Currently there are two sub-commands supported `add` and `list`:

```shell
USAGE:
Expand Down
4 changes: 2 additions & 2 deletions guide/src/light_clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Using the `light` command you can add and remove light client peer information t

#### Show usage

To see the available subcommands for the `light` command run:
To see the available sub-commands for the `light` command run:

```shell
hermes help light
```

There are two subcommands supported `add` and `rm`:
There are two sub-commands supported `add` and `rm`:

```shell
USAGE:
Expand Down
6 changes: 5 additions & 1 deletion guide/src/query_channel.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Table of Contents

<!-- toc -->

# Query Channels

Use the `query channels` command to query the identifiers of all channels on a given chain.
Expand Down Expand Up @@ -57,7 +61,7 @@ USAGE:
hermes query channel end <OPTIONS>

DESCRIPTION:
query channel end
Query channel end

POSITIONAL ARGUMENTS:
chain_id identifier of the chain to query
Expand Down
5 changes: 5 additions & 0 deletions guide/src/query_client.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Table of Contents

<!-- toc -->

# Query Clients
Use the `query clients` command to query the identifiers of all clients on a given chain.

Expand Down
4 changes: 4 additions & 0 deletions guide/src/query_connection.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Table of Contents

<!-- toc -->

# Query Connections

Use the `query connections` command to query the identifiers of all connections on a given chain.
Expand Down
6 changes: 6 additions & 0 deletions guide/src/query_packet.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Packet Queries

Use the `query packet` commands to query information about packets.
Expand All @@ -19,6 +20,11 @@ SUBCOMMANDS:
unreceived-acks query unreceived acknowledgments
```

## Table of Contents

<!-- toc -->


## Packet Commitments

Use the `query packet commitments` command to query the sequence numbers of all packets that have been sent but not yet acknowledged (these are the packets that still have their commitments stored).
Expand Down
4 changes: 4 additions & 0 deletions guide/src/tx_channel_close.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

The channel close handshake involves two steps: init and confirm.

## Table of Contents

<!-- toc -->

## Channel Close Init

Use the `chan-close-init` command to initialize the closure of a channel.
Expand Down
4 changes: 4 additions & 0 deletions guide/src/tx_channel_open.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ sequenceDiagram

</center>

## Table of Contents

<!-- toc -->

## Channel Open Init

Use the `chan-open-init` command to initialize a new channel.
Expand Down
3 changes: 3 additions & 0 deletions guide/src/tx_client.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Client
The `tx raw` commands can be used to create and update the on-chain IBC clients.

## Table of Contents
<!-- toc -->

## Create Client
Use the `create-client` command to create a new client.

Expand Down
4 changes: 4 additions & 0 deletions guide/src/tx_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ sequenceDiagram

</center>

## Table of Contents

<!-- toc -->

## Connection Init

Use the `conn-init` command to initialize a new connection on a chain.
Expand Down
4 changes: 4 additions & 0 deletions guide/src/tx_packet.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Packet Tx Commands

## Table of Contents

<!-- toc -->

## Fungible token transfer

Use the `tx raw ft-transfer` command to send ICS-20 fungible token transfer packets.
Expand Down

0 comments on commit b1b9dac

Please sign in to comment.