diff --git a/.github/workflows/guide.yml b/.github/workflows/guide.yml index 8040e75277..e9a01a7e51 100644 --- a/.github/workflows/guide.yml +++ b/.github/workflows/guide.yml @@ -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 }} diff --git a/guide/book.toml b/guide/book.toml index 21860483cc..71b1e8bc1d 100644 --- a/guide/book.toml +++ b/guide/book.toml @@ -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"] diff --git a/guide/src/config.md b/guide/src/config.md index 9c672bad00..77f7b09b91 100644 --- a/guide/src/config.md +++ b/guide/src/config.md @@ -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. diff --git a/guide/src/help.md b/guide/src/help.md index 5acf300754..bfccfde732 100644 --- a/guide/src/help.md +++ b/guide/src/help.md @@ -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: diff --git a/guide/src/keys.md b/guide/src/keys.md index bf9c674930..85f31da966 100644 --- a/guide/src/keys.md +++ b/guide/src/keys.md @@ -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: diff --git a/guide/src/light_clients.md b/guide/src/light_clients.md index 1d6d5253ef..ec5cf1a5c8 100644 --- a/guide/src/light_clients.md +++ b/guide/src/light_clients.md @@ -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: diff --git a/guide/src/query_channel.md b/guide/src/query_channel.md index 3ca2b3d529..aa5b6aeaad 100644 --- a/guide/src/query_channel.md +++ b/guide/src/query_channel.md @@ -1,3 +1,7 @@ +# Table of Contents + + + # Query Channels Use the `query channels` command to query the identifiers of all channels on a given chain. @@ -57,7 +61,7 @@ USAGE: hermes query channel end DESCRIPTION: - query channel end + Query channel end POSITIONAL ARGUMENTS: chain_id identifier of the chain to query diff --git a/guide/src/query_client.md b/guide/src/query_client.md index 501c409ddc..02bcc18100 100644 --- a/guide/src/query_client.md +++ b/guide/src/query_client.md @@ -1,3 +1,8 @@ + +# Table of Contents + + + # Query Clients Use the `query clients` command to query the identifiers of all clients on a given chain. diff --git a/guide/src/query_connection.md b/guide/src/query_connection.md index dcfe576675..63ca6c0703 100644 --- a/guide/src/query_connection.md +++ b/guide/src/query_connection.md @@ -1,3 +1,7 @@ +# Table of Contents + + + # Query Connections Use the `query connections` command to query the identifiers of all connections on a given chain. diff --git a/guide/src/query_packet.md b/guide/src/query_packet.md index 13f4c0ac1c..91191fcbc8 100644 --- a/guide/src/query_packet.md +++ b/guide/src/query_packet.md @@ -1,3 +1,4 @@ + # Packet Queries Use the `query packet` commands to query information about packets. @@ -19,6 +20,11 @@ SUBCOMMANDS: unreceived-acks query unreceived acknowledgments ``` +## Table of Contents + + + + ## 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). diff --git a/guide/src/tx_channel_close.md b/guide/src/tx_channel_close.md index 995312da1e..24abc12267 100644 --- a/guide/src/tx_channel_close.md +++ b/guide/src/tx_channel_close.md @@ -2,6 +2,10 @@ The channel close handshake involves two steps: init and confirm. +## Table of Contents + + + ## Channel Close Init Use the `chan-close-init` command to initialize the closure of a channel. diff --git a/guide/src/tx_channel_open.md b/guide/src/tx_channel_open.md index 95b703159a..75204a2101 100644 --- a/guide/src/tx_channel_open.md +++ b/guide/src/tx_channel_open.md @@ -25,6 +25,10 @@ sequenceDiagram +## Table of Contents + + + ## Channel Open Init Use the `chan-open-init` command to initialize a new channel. diff --git a/guide/src/tx_client.md b/guide/src/tx_client.md index c11c01a770..bf1ec43b0d 100644 --- a/guide/src/tx_client.md +++ b/guide/src/tx_client.md @@ -1,6 +1,9 @@ # Client The `tx raw` commands can be used to create and update the on-chain IBC clients. +## Table of Contents + + ## Create Client Use the `create-client` command to create a new client. diff --git a/guide/src/tx_connection.md b/guide/src/tx_connection.md index 8c2897ea7d..f799cdc740 100644 --- a/guide/src/tx_connection.md +++ b/guide/src/tx_connection.md @@ -25,6 +25,10 @@ sequenceDiagram +## Table of Contents + + + ## Connection Init Use the `conn-init` command to initialize a new connection on a chain. diff --git a/guide/src/tx_packet.md b/guide/src/tx_packet.md index 054df2f04e..3e08b99a48 100644 --- a/guide/src/tx_packet.md +++ b/guide/src/tx_packet.md @@ -1,5 +1,9 @@ # Packet Tx Commands +## Table of Contents + + + ## Fungible token transfer Use the `tx raw ft-transfer` command to send ICS-20 fungible token transfer packets.