books: add skeleton and docs (#141)

* update `books/`

* update CONTRIBUTING.md

* .gitignore: ignore built books

* add dummy `books/architecture/`

* remove some changes from CONTRIBUTING.md

out of scope, will be in another PR

* add docs/books to LICENSE

* formatting
This commit is contained in:
hinto-janai 2024-05-29 20:19:46 -04:00 committed by GitHub
parent c50d9642be
commit d21160868c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 72 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
target/
.vscode
monerod
books/*/book

View file

@ -64,3 +64,8 @@ This section is primarily targeted at maintainers. Most contributors aren't able
[I-]: https://github.com/Cuprate/cuprate/labels?q=I
[O-]: https://github.com/Cuprate/cuprate/labels?q=O
[P-]: https://github.com/Cuprate/cuprate/labels?q=P
## Books
Cuprate has various documentation books whose source files live in [`books/`](https://github.com/Cuprate/cuprate/tree/main/books).
Please contribute if you found a mistake! The files are mostly [markdown](https://wikipedia.org/wiki/Markdown) files and can be easily edited. See the `books/` directory for more information.

View file

@ -3,3 +3,6 @@ depending on the crate in question. Each crate declares their license in their
`Cargo.toml`. Additionally, a full copy of both licenses are included in the
root of this repository for reference. These copies should be provided with
any distribution of a crate, as per the respective license's terms.
All documentation, including the books in the `books/` directory, is licensed
under the MIT license.

View file

@ -1 +1,28 @@
# TODO
## Books
This directory contains the source files for Cuprate's various books.
The source files are edited here, and published in other repositories, see:
- [Cuprate's architecture book](https://github.com/Cuprate/architecture-book)
- [Cuprate's protocol book](https://github.com/Cuprate/monero-book)
## Build tools
Building the book(s) requires [Rust's cargo tool](https://doc.rust-lang.org/cargo/getting-started/installation.html) and [mdBook](https://github.com/rust-lang/mdBook).
After installing `cargo`, install `mdbook` with:
```bash
cargo install mdbook
```
## Building
To build a book, go into a book's directory and build:
```bash
# This build Cuprate's architecture book.
cd architecture/
mdbook build
```
The output will be in the `book` subdirectory (`architecture/book` for the above example). To open the book, you can open it in your web browser like so:
```bash
mdbook build --open
```

View file

@ -1 +1,6 @@
# TODO
## Cuprate's architecture (implementation) book
This book documents Cuprate's architecture and implementation.
See:
- <https://architecture.cuprate.org>
- <https://github.com/Cuprate/architecture-book>

View file

@ -0,0 +1,19 @@
[book]
authors = ["hinto-janai"]
language = "en"
multilingual = false
src = "src"
title = "Cuprate Architecture"
git-repository-url = "https://github.com/Cuprate/architecture-book"
# TODO: fix after importing real files.
#
# [preprocessor.last-changed]
# command = "mdbook-last-changed"
# renderer = ["html"]
#
# [output.html]
# default-theme = "ayu"
# preferred-dark-theme = "ayu"
# git-repository-url = "https://github.com/hinto-janai/cuprate-architecture"
# additional-css = ["last-changed.css"]

View file

@ -0,0 +1,3 @@
# Summary
- [TODO](todo.md)

View file

@ -0,0 +1 @@
# TODO

View file

@ -1 +1,6 @@
# TODO
## Cuprate's protocol book
This book documents the Monero protocol.
See:
- <https://monero-book.cuprate.org>
- <https://github.com/Cuprate/monero-book>