Migration
Migrating from ibis-next
papyrus migrate-ibis
papyrus migrate-ibis -d /path/to/book
papyrus migrate-ibis --force
papyrus migrate-ibis --format=yml
| Option | Short | Meaning |
|---|---|---|
--dir |
-d |
Book root |
--force |
-f |
Overwrite an existing Papyrus config file |
--format |
php (default), yml / yaml, or json |
This writes papyrus.php (or .yml / .json) from ibis.php. If you still have custom
assets/theme*.html files from ibis, it rewrites <!-- IBIS:TOC --> to
<!-- PAPYRUS:TOC --> in those project files only. Bundled Papyrus
themes (used when assets/ has no theme override) already use the Papyrus
marker — migrate-ibis does not copy or rewrite vendor assets.
YAML/JSON migrations drop configure_commonmark (callables need papyrus.php).
After migration:
- Remove
hi-folks/ibis-nextand any Composer patches for ibis/mPDF. - Point scripts at
papyrus(build,build:pdf,build:site, …). - Decide on themes: keep your ibis HTML under
assets/as overrides, or delete those copies and use Papyrus defaults (optionalpapyrus asset:publishlater if you want local copies to edit). - Run
papyrus doctorand a fullpapyrus build.
Continuous integration
For documentation sites (build:site + GitHub Pages), see
CI for documentation — Composer for PHP repos and
papyrus.phar for everything else.
For full book builds (PDF / EPUB / KDP), copy
stubs/github/workflows/book-build.yml from the Papyrus package. A typical job
installs PHP with dom, gd, mbstring, zip, zlib, runs composer install
(or downloads the PHAR), then papyrus doctor and papyrus build.
Programmatic use
use Milon\Papyrus\Config\Project;
$project = Project::load($bookDir);
$book = $project->bookConverter()->convertDirectory($project->contentDir);
Checklist before release
papyrus doctoris cleanpapyrus buildsucceeds for every themepapyrus build:sitelooks right on phone and desktop (try light and dark)- Sample ranges still make sense after reflows (
build:sample) - KDP EPUB opens in Kindle Previewer; print PDF matches trim/bleed
- Pin a Papyrus version in the book’s
composer.json
Report problems at github.com/milon/papyrus/issues.