-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add mdbook readme and common CI to release mdbooks (#182)
- Loading branch information
1 parent
c33431f
commit 49d5c16
Showing
3 changed files
with
89 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# ZKsync Solidity Compiler Toolchain Documentation | ||
|
||
This directory contains an `mdBook` project for ZKsync Solidity Compiler Toolchain documentation. | ||
This README will guide you on how to build and test the book locally. | ||
|
||
## Prerequisites | ||
|
||
Before you begin, ensure you have the `mdbook` installed: | ||
|
||
```bash | ||
cargo install mdbook | ||
``` | ||
|
||
## Build the Book | ||
|
||
To build the book, use the following command: | ||
|
||
```bash | ||
mdbook build | ||
``` | ||
|
||
This command generates the static HTML files in the `book/` directory. You can open `book/index.html` in your browser to view the generated book. | ||
|
||
## Serve the Book Locally | ||
|
||
For easier development and to preview changes as you edit, you can serve the book locally with: | ||
|
||
```bash | ||
mdbook serve | ||
``` | ||
|
||
This will start a local web server and open the book in your default browser. Any changes made to the markdown files will automatically reload the book. | ||
|
||
By default, the book will be accessible at: `http://localhost:3000`. | ||
|
||
## Testing the Book | ||
|
||
To ensure your book is correctly built and formatted, you can use the built-in `mdBook` linter by running: | ||
|
||
```bash | ||
mdbook test | ||
``` | ||
|
||
This will check for common issues such as broken links or missing files. | ||
|
||
## Directory Structure | ||
|
||
- `src/`: This directory contains all the markdown files for the chapters. | ||
- `book/`: This is the output directory where the built HTML files are generated. | ||
- `book.toml`: Configuration file for the `mdBook`. | ||
|
||
## Deployment | ||
|
||
The book is automatically deployed each time a commit is pushed to the `main` branch or a new release tag is created. | ||
The generated HTML files are hosted on GitHub Pages and are accessible at: | ||
* https://matter-labs.github.io/era-compiler-solidity/latest/ for the latest documentation. | ||
* https://matter-labs.github.io/era-compiler-solidity/vX.Y.Z/ for the specific version documentation. |