Create book from markdown files. Like Gitbook but implemented in Rust
Go to file
Marcello DeSales 35fd99b05a
📝 🐳 ♻️ add instructions for docker compose
2023-11-23 09:30:00 -08:00
.github Make sure CI runs with --locked 2023-02-13 07:43:46 -08:00
ci Also make sure releases use --locked 2023-02-13 07:53:32 -08:00
examples upgrade clap to 4.0 2022-12-14 17:11:08 -08:00
guide Update continuous-integration.md 2023-02-14 08:29:40 +02:00
src Merge pull request #2017 from thanatos/roy/fix-sidebar 2023-02-13 12:42:15 -08:00
test_book Add styles for <kbd> elements 2022-10-06 16:02:29 -04:00
tests Make fonts part of the theme. 2023-01-15 11:42:46 -08:00
.gitattributes Explicitly mark fonts and images files as binary (#951) 2019-06-11 21:44:15 +02:00
.gitignore Setup basic structure for test book 2021-10-04 13:14:49 +05:30
CHANGELOG.md Update to 0.4.27 2023-02-13 07:54:28 -08:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md Add issue templates and update contributor docs 2023-01-16 09:22:54 -08:00
Cargo.lock Update to 0.4.27 2023-02-13 07:54:28 -08:00
Cargo.toml Update to 0.4.27 2023-02-13 07:54:28 -08:00
Dockerfile 🐳 ♻️ 📌 set alpine@3.18.4 as runtime image 2023-11-23 07:58:57 -08:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
README.md 📝 🐳 ♻️ add instructions for docker compose 2023-11-23 09:30:00 -08:00
docker-compose.yaml 🐳 🌟 add docker compose for build/run 2023-11-23 08:55:00 -08:00
release.toml Metadata for cargo-release should be in release.toml (#722) 2018-07-09 18:36:55 +08:00
triagebot.toml Add issue templates and update contributor docs 2023-01-16 09:22:54 -08:00

README.md

mdBook

Build Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

Container

NOTE: You need to have docker installed https://docs.docker.com/engine/install/

  1. Locate a local directory with md files
  2. Quickly run a docker container with the current version:
docker run -ti -v $(pwd):/mdbook -p 3000:3000 rust-lang/mdbook
  • Using docker-compose.yaml, you can run to load the sources from the test-book.
$ docker compose up --build
[+] Building 0.0s (0/0)                                                                                                                                              docker-container:mac-linux-builder
[+] Running 1/1
 ✔ Container rustlang-mdbook  Recreated                                                                                                                                                            0.1s 
Attaching to rustlang-mdbook
rustlang-mdbook  | 2023-11-23 16:52:59 [INFO] (mdbook::book): Book building has started
rustlang-mdbook  | 2023-11-23 16:52:59 [INFO] (mdbook::book): Running the html backend
rustlang-mdbook  | 2023-11-23 16:53:00 [INFO] (mdbook::cmd::serve): Serving on: http://0.0.0.0:3000
rustlang-mdbook  | 2023-11-23 16:53:00 [INFO] (warp::server): Server::run; addr=0.0.0.0:3000
rustlang-mdbook  | 2023-11-23 16:53:00 [INFO] (warp::server): listening on http://0.0.0.0:3000
rustlang-mdbook  | 2023-11-23 16:53:00 [INFO] (mdbook::cmd::watch): Listening for changes...
  • Test it in a container as well

NOTE: docker compose creates a default network with the name of the dir_default

docker run -ti --network mdbook_default alpine/lynx mdbook:3000
                                                                                                                                                                                  
Introduction (p1 of 3)
    1. Prefix Chapter
    2.
    3. 1. Introduction
    4. 2. Draft Chapter
    5.
    6. Actual Markdown Tag Examples
    7. 3. Markdown Individual tags
    8.
         1. 3.1. Heading
         2. 3.2. Paragraphs
         3. 3.3. Line Break
         4. 3.4. Emphasis
         5. 3.5. Blockquote
         6. 3.6. List
         7. 3.7. Code
         8. 3.8. Image
         9. 3.9. Links and Horizontal Rule
        10. 3.10. Tables

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.