Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getzola/book
Gitbook theme for Zola
https://github.com/getzola/book
Last synced: about 1 month ago
JSON representation
Gitbook theme for Zola
- Host: GitHub
- URL: https://github.com/getzola/book
- Owner: getzola
- License: mit
- Created: 2017-10-24T16:52:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-09T20:56:05.000Z (about 1 year ago)
- Last Synced: 2024-09-25T00:18:24.831Z (3 months ago)
- Language: SCSS
- Homepage:
- Size: 198 KB
- Stars: 58
- Watchers: 5
- Forks: 19
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - getzola/book - Gitbook theme for Zola (others)
README
# book
A theme based on [Gitbook](https://www.gitbook.com), to write documentation
or books.![book screenshot](https://github.com/Keats/book/blob/master/screenshot.png?raw=true)
## Contents
- [Installation](#installation)
- [Options](#options)
- [Numbered chapters](#numbered-chapters)## Installation
First download this theme to your `themes` directory:```bash
$ cd themes
$ git clone https://github.com/getzola/book.git
```
and then enable it in your `config.toml`:```toml
theme = "book"
# Optional, if you want search
build_search_index = true
```## Usage
Book will generate a book from the files you place in the `content` directory. Your book
can have two levels of hierarchy: chapters and subchapters.Each chapter should be a `section` within the Gutenberg site and should have an `_index.md`
file that sets its `weight` front-matter variable to its chapter number. For example,
chapter 2 should have `weight = 2`. Additionally, each chapter should also set the
`sort_by = "weight"` in its front matter.Each subchapter should be a `page` and should have its `weight` variable set to the subchapter
number. For example, subchapter 3.4 should have `weight = 4`.Finally, you should create an `_index.md` file and set the `redirect_to` front-matter variable
to redirect to the first section of your content. For example, if your first section has the
slug `introduction`, then you would set `redirect_to = "introduction"`.## Options
### Numbered chapters
By default, the `book` theme will number the chapters and pages in the left menu.
You can disable that by setting the `book_number_chapters` in `extra`:```toml
book_number_chapters = false
```