Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
mx - CI - mdbook addons - admonition(callouts) and mermaid (code driv…
Browse files Browse the repository at this point in the history
…en diagrams) with example implementation (#2025)

* P1 (#1)

* CI trigger test with changes

* CI trigger test with changes - type fix

* Post Trigger Rendering Test

* remove actions triggers on P1 branch used during testing

* mx - P1 Prep PR - with configured md-admonition and md-mermaid   (#2)

* CI trigger test with changes

* CI trigger test with changes - type fix

* Post Trigger Rendering Test

* remove actions triggers on P1 branch used during testing

* Add example callouts (admonitions) and mermaid diagram in intro.md

* Update book/getting-started/intro.md

Co-authored-by: Georgios Konstantopoulos <[email protected]>
  • Loading branch information
m0ham3dx and gakonst authored Jan 8, 2023
1 parent 01d3e43 commit b5eddf1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths:
- 'book/**'
- 'book.toml'

pull_request:
branches: [master]
paths:
Expand All @@ -23,6 +24,8 @@ jobs:
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl -sSL https://github.com/tommilligan/mdbook-admonish/releases/download/v1.8.0/mdbook-admonish-v1.8.0-x86_64-unknown-linux-gnu.tar.gz| tar -xz --directory=./mdbook
curl -sSL https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.6/mdbook-mermaid-v0.12.6-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install mdbook-template
Expand All @@ -32,7 +35,10 @@ jobs:
echo `pwd`/mdbook-template >> $GITHUB_PATH
- name: Build
run: mdbook build
run: |
mdbook-admonish install
mdbook-mermaid install
mdbook build
- name: Save pages artifact
uses: actions/upload-pages-artifact@v1
Expand Down
32 changes: 31 additions & 1 deletion book/getting-started/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@ Welcome to the hands-on guide for the ethers-rs library!

This documentation contains a collection of examples demonstrating how to use the library to build Ethereum-based applications in Rust. The examples cover a range of topics, from basic smart contract interactions to more advanced usage of ethers-rs.

```admonish info
You can find the official ethers-rs documentation on docs.rs - [here](https://docs.rs/ethers/0.5.0/ethers/).
```

Each example includes a detailed description of the functionality being demonstrated, as well as complete code snippets that you can use as a starting point for your own projects.

We hope that these docs will help you get started with ethers-rs and give you a better understanding of how to use the library to build your own web3 applications in Rust. If you have any questions or need further assistance, please don't hesitate to reach out to the ethers-rs community.
We hope that these docs will help you get started with ethers-rs and give you a better understanding of how to use the library to build your own web3 applications in Rust. If you have any questions or need further assistance, please don't hesitate to reach out to the ethers-rs community.

The following is a brief overview diagram of the topis covered in this guide.

```mermaid
graph LR
%% The code below is for styling the graph
%%-------------------------------------------------
%%{init: {'theme':'dark', 'themeVariables':{'textColor':' #ffffff ', 'nodeBorder':'#ff2d00', 'edgeLabelBackground':'#000000' ,'lineColor':'#87ff00', 'fontSize':'14px', 'curve':'linear'}}}%%
%%-------------------------------------------------
%% Actual Diagram code is below
A[Ethers-rs <br> Manual] --> A1[Providers]
A --> A2[Middleware]
A --> A3[Contracts]
A --> A4[Events]
A --> A5[Subscriptions]
A --> A6[Queries]
A --> A7[Transactions]
A --> A8[Wallets]
A --> A9[Big numbers]
A --> A10[Anvil]
```
```admonish bug
This diagram is incomplete and will undergo continuous changes.
```

0 comments on commit b5eddf1

Please sign in to comment.