Add Book to Buckyverse
Copy the manuscript (source) layout from a Codexis-style book project into buckyverse2/priv/books so the book can be built and served on Buckyverse. Buckyverse v2 expects source files, not build output.
When to use
- •User says "add book to buckyverse", "deploy to buckyverse2", or "copy to buckyverse2/priv/books"
- •Preparing a new or updated book for buckyverse.org
Target layout (buckyverse v2)
Destination is always:
buckyverse2/priv/books/<book_slug>/ ├── manuscript.tex ├── meta.yaml ├── config.yaml ├── content/ # chapters, front-matter, back-matter, bibliography, images, etc. ├── styles/ # e.g. base.sty └── assets/ # fonts/, ocr/, scans/ (and optionally figures/)
Use a short, URL-safe slug (e.g. grunch_of_giants, test_book). Reference layout: buckyverse.org/buckyverse2/priv/books/grunch_of_giants.
What to copy
Source = the book’s manuscript (source) directory — the same layout Codexis uses as --source (e.g. manuscript/ or the book repo root). Do not use Codexis build output (e.g. output/wikijs/).
| Source (manuscript root) | Destination (buckyverse2/priv/books/<book_slug>/) |
|---|---|
manuscript.tex (or main .tex) | manuscript.tex |
meta.yaml | meta.yaml |
config.yaml | config.yaml |
content/ | content/ (entire tree) |
styles/ | styles/ (entire tree) |
assets/ | assets/ (entire tree: fonts/, ocr/, scans/, figures/ as present) |
Copy directory trees as-is. Build artifacts (e.g. .aux) and .gitignore may be present in the reference book; include or exclude per user preference (default: include).
Path handling
- •Use PathBuilder for all path operations (see project rule codexis.mdc).
- •Example:
PathBuilder.join([buckyverse2_root, "priv", "books", book_slug, "manuscript.tex"]). - •Buckyverse2 root: often
buckyverse.org/buckyverse2(e.g./Volumes/Storage/belmendo/Projects/buckyverse.org/buckyverse2) or ask the user.
Preferred method: script
Use the project script (run in your terminal; requires access to both manuscript and buckyverse2 paths):
./scripts/add_book_to_buckyverse2.sh <manuscript_dir> <book_slug> [buckyverse2_root]
Example — add elib-cosmography as cosmography:
./scripts/add_book_to_buckyverse2.sh /path/to/elib-cosmography/manuscript cosmography
Optional third argument: buckyverse2 root (default: .../buckyverse.org/buckyverse2). The script creates the destination, copies root files (manuscript.tex, meta.yaml, config.yaml), and rsyncs content/, styles/, assets/.
Manual steps
- •Resolve paths: Manuscript (source) dir and
buckyverse2/priv/books/<book_slug>. - •Create destination: Ensure
buckyverse2/priv/books/<book_slug>exists. - •Copy root files:
manuscript.tex,meta.yaml,config.yaml(use main .tex name as manuscript.tex if different). - •Copy trees:
content/,styles/,assets/recursively. - •Confirm: List destination and report any missing source paths.
Reference
- •Canonical v2 example and slug conventions: reference.md