Skip to content

codesections-forks/book

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

book

A theme based on Gitbook, to write documentation or books.

book screenshot

Contents

Installation

First download this theme to your themes directory:

$ cd themes
$ git clone https://github.com/Keats/book.git

and then enable it in your config.toml:

theme = "book"

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 = "order" in its front matter.

Each subchapter should be a page and should have its order variable set to the subchapter number. For example, subchapter 3.4 should have order = 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_numbered_chapters in extra:

book_numbered_chapters = false

About

Gitbook theme for Gutenberg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 66.1%
  • HTML 31.4%
  • JavaScript 2.5%