[−][src]Module adbook::book
Book data structure
It's based on two kinds of files: book.ron
and toc.ron
(toc standing for table of contents).
Those files are written in the human-friendly Ron format.
book.ron
An adbook project has such a file structure:
.
├── book.ron # configuration file in root
├── site # `.html` files
└── src # source files
book.ron
maps to BookRon
. It indicates a root directory and provides some configuration such
as the book name and the author name.
toc.ron
When you run adbook build
, it will look into src/toc.ron
and searches files or sub directroes in
it, recursively:
└── src
├── a.adoc
├── sub_directory
│ ├── preface.adoc
│ └── toc.ron # lists `preface.adoc`
└── toc.ron # lists `a.adoc` and `sub_directory`
toc.ron
maps to TocRon
. It's similar to mod.rs
in Rust.
Modules
config | Configuration types deserialized from |
init | Files/directories that are created when initializing a book directory |
toc | Table of contents, list of items in a directory |
walk |
|
Structs
BookStructure | File structure of an adbook project read from |
Enums
BookLoadError | Error while loading |