AgentSkillsCN

add-book-to-buckyverse

将书籍稿件(源文件)复制到 buckyverse2 中进行托管。将 manuscript.tex、meta.yaml、config.yaml、content/、styles/ 以及 assets/ 复制到 buckyverse2/priv/books/<book_slug>。当您需要将书籍添加至 buckyverse、部署至 buckyverse2,或把书籍文件复制到 buckyverse2/priv/books 时,此技能便能派上用场。

SKILL.md
--- frontmatter
name: add-book-to-buckyverse
description: Copy a book manuscript (source) into buckyverse2 for hosting. Copies manuscript.tex, meta.yaml, config.yaml, content/, styles/, and assets/ to buckyverse2/priv/books/<book_slug>. Use when adding a book to buckyverse, deploying to buckyverse2, or copying book files to buckyverse2/priv/books.

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:

text
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.yamlmeta.yaml
config.yamlconfig.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):

bash
./scripts/add_book_to_buckyverse2.sh <manuscript_dir> <book_slug> [buckyverse2_root]

Example — add elib-cosmography as cosmography:

bash
./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

  1. Resolve paths: Manuscript (source) dir and buckyverse2/priv/books/<book_slug>.
  2. Create destination: Ensure buckyverse2/priv/books/<book_slug> exists.
  3. Copy root files: manuscript.tex, meta.yaml, config.yaml (use main .tex name as manuscript.tex if different).
  4. Copy trees: content/, styles/, assets/ recursively.
  5. Confirm: List destination and report any missing source paths.

Reference

  • Canonical v2 example and slug conventions: reference.md