mx - CI - mdbook addons - admonition(callouts) and mermaid (code driven 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 <me@gakonst.com>
This commit is contained in:
m0ham3dx 2023-01-08 07:59:16 +05:30 committed by GitHub
parent 01d3e4310f
commit b5eddf1985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 2 deletions

View File

@ -5,6 +5,7 @@ on:
paths:
- 'book/**'
- 'book.toml'
pull_request:
branches: [master]
paths:
@ -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
@ -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

View File

@ -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.
```