Commit d618a8d6 authored by Irene "Tissy" Pirrotta's avatar Irene "Tissy" Pirrotta
Browse files

New guide for compile and use mdBook for documentation.

parent 37410738
# Parrot New Documentation
### Compile locally mdBook for Parrot Documentation
New Parrot documentation using mdbook
First step: Create the working directory and clone locally the Documentation repo
## Why this?
`mkdir doc`
Maybe mdbook can be useful for the new Parrot documentation. It is lightweight, modern and written in Rust.
`git clone `
## Installation
`cd misc`
Inside this branch there is already a compiled and optimized version of mdbook (16.9 mb), but if you want you can compile yourself mdbook
`git switch doc-assembled`
`cd mdbook`
Second step: Clone mdBook repo
`cargo build --release`
and the generated binary file will be on `./target/release` folder.
`cd ..`
## Build
`git clone`
Run `./mdbook serve` to build and deploy (and eventually rebuild it at each change) the book on http://localhost:3000
`cd mdBook`
Run `./mdbook clean` to delete the build directory (which the book is generated)
`git switch localization`
To allowing space in's link destination use <.md file>, for example:
` - [What is Parrot](<./01.- What is>) `
Third step: Compile mdBook
## Localization
Thanks to the mdbook fork by Ruin0x11 (and updated by Nutomic it is possible to make the documentation multilanguage. To do this, you need to add `[language.key_lang]` to the book.toml file.
`cargo build --release`
Also you will need to change the main structure of the src folder, like the following example:
Wait for the compiler to finish its work, then go to the third step:
├── book.toml
└── src
├── en
│ ├── chapter
│ │ ├──
│ │ ├──
│ │ └──
│ ├──
│ ├──
│ └──
└── es
├── chapter
│ ├──
│ ├──
│ ├──
│ └──
`mv ~/mdBook/target/release/mdbook ~/misc/mdbook `
Everything is still to be tested properly.
Now that mdBook has been compiled, launch it:
### Troubleshooting:
`cd ~/misc/mdbook`
`./mdbook serve`
It's possible that the `./mdbook serve` command return this error:
Then open your favorite launcher and type:
**./mdbook: /lib/x86_64-linux-gnu/ version `GLIBC_2.33' not found (required by ./mdbook)**
Not all distros might have the latest glibc library, so update your system or update it through [](
\ No newline at end of file
and there's our beautiful documentation running locally.
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment