Bookstacks is a Jekyll static site for reading public domain literature at https://bookstacks.org.
The library is organized directly as Markdown source under authors/. Jekyll
layouts build the author pages, book tables of contents, and individual chapter
reading pages from that content.
_layouts/: Jekyll layouts for the default page shell, author indexes, book
indexes, and chapter pages._includes/: shared header and footer markup.assets/css/style.css: theme, index, table of contents, and reader styles.assets/js/theme.js: light/dark theme, accent color, and seasonal UI behavior.assets/*.html: temporary raw Gutenberg import files, removed after they are
converted or identified as duplicates.authors/<author-slug>/index.md: author landing pages.authors/<author-slug>/<book-slug>/index.md: book table of contents pages.authors/<author-slug>/<book-slug>/chapter-N.md: chapter source files.img/: image assets, generally grouped by author slug.seed_indexes.py: utility script for creating missing author and book index
files from existing chapter front matter.Author index pages use:
---
layout: author_index
title: "Jane Austen"
author_name: "Jane Austen"
---
Book index pages use:
---
layout: book_index
title: "Pride and Prejudice"
book_title: "Pride and Prejudice"
author: "Jane Austen"
---
Chapter pages use:
---
layout: book
title: "Chapter 1"
chapter_order: 1
book: "Pride and Prejudice"
author: "Jane Austen"
---
Chapter ordering is controlled by chapter_order, not filename sorting. Keep
book and author consistent across every chapter in the same book.
Optional TOC fields can refine book tables of contents:
toc_section: "Volume I"
toc_title: "Chapter 1. A Beginning"
Book TOCs render as regular trees. Plain headings come from toc_section or
from leading Markdown/HTML headings inside chapter bodies; chapter entries are
the operative links.
authors/<author-slug>/<book-slug>/.chapter-1.md,
chapter-2.md, and so on.layout: book, title, chapter_order, book, and author front
matter to every chapter.index.md and author index.md, or run:python seed_indexes.py
seed_indexes.py only creates missing index files. It does not split books,
rewrite chapters, or update existing indexes.
Raw Project Gutenberg HTML can be placed in the root of assets/ for import.
Before creating new Markdown, check whether the title already exists as a book
or as a chapter within an existing book for that author.
Converted works belong under authors/<author-slug>/<book-slug>/ as a book
index.md plus one Markdown file per rendered chapter or section. Strip
Gutenberg boilerplate, generated contents, license text, and HTML navigation.
After each raw file has been converted or classified as a duplicate, remove it
from assets/.
Requirements:
seed_indexes.pyThis repo does not currently include a Gemfile, so use an environment where
the jekyll command is available. The current local setup has been tested with
Jekyll 4.4.1.
Serve locally:
jekyll serve
Build the site:
jekyll build
The corpus is large, so full builds can take a while.
Works hosted here are intended to be public domain in the United States. Users outside the United States should verify the copyright status in their own jurisdiction.