Skip to content

Commit

Permalink
docs: nix is now the default way for docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
igordejanovic committed Jun 2, 2024
1 parent c35f960 commit 1efb081
Showing 1 changed file with 13 additions and 37 deletions.
50 changes: 13 additions & 37 deletions docs/src/docs_setup.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,16 @@
# Installation and setup

To render this document locally in your browser do (this should be done only
once to install `mdbook`):

1. [Install Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html)
2. With cargo install mdbook and used processors
```sh
cargo install mdbook --git https://github.com/igordejanovic/mdBook.git --branch merged-prs
cargo install mdbook-admonish
cargo install mdbook-bib
cargo install mdbook-theme
cargo install mdbook-plantuml
cargo install mdbook-graphviz
cargo install mdbook-linkcheck
```

Optional:

1. For pdf output:
```sh
cargo install mdbook-pdf
```

2. For pdf outline support see [this](https://github.com/HollowMan6/mdbook-pdf/issues/1#issuecomment-1366157949):
```sh
pip install --user mdbook-pdf-outline
```

In the root of the `docs` directory run `mdbook serve`. The book will be available
at [http://localhost:3000/]()

# Setup using Nix Flakes

Alternatively, you can use [Nix package manager](https://nixos.org/) to setup
documentation locally. Instead of the above steps just install Nix, [enable
flakes](https://nixos.wiki/wiki/flakes), and from the root of the project run:
Rustemo uses [Nix package manager](https://nixos.org/) to setup reproducible
documentation development environment locally.

1. [Install Nix](https://nixos.org/download/)
2. [Enable flakes](https://nixos.wiki/wiki/flakes)

```
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
```

3. From the root of the project run:

```
nix develop
Expand Down Expand Up @@ -62,9 +38,9 @@ See [this part of the manual](https://rust-lang.github.io/mdBook/format/mdbook.h

See [this](https://users.rust-lang.org/t/mdbook-how-to-use-cross-references/83713) on how to reference to other section of the document.

# Bibliography
<!-- # Bibliography -->

Uses [mdbook-bib](https://github.com/francisco-perez-sorrosal/mdbook-bib) to reference books, papers etc.
<!-- Uses [mdbook-bib](https://github.com/francisco-perez-sorrosal/mdbook-bib) to reference books, papers etc. -->

# Diagrams

Expand Down

0 comments on commit 1efb081

Please sign in to comment.