Xantora
A PDF-converter for Antora (AsciiDoc) documents.
This Ruby CLI-Tool uses asciidoctor-pdf and makes it easy to export PDF's from Antora projects.
Installation
Install the gem:
gem install xantoraUsage
Convert a single AsciiDoc document:
xantora convert modules/user-guide/pages/index.adocConvert a all documents within an Antora component:
xantora convert modules/Convert all documents and store PDF's in the attachment folders (using option --to-attachments or -A):
xantora convert modules/ --to-attachments See xantora help for more usage instructions.
Features
- Preconfigured asciidoctor-pdf setup wich makes it simple to convert single Antora documents or whole modules into PDF's
- Integrated PDF-theme suppport which makes your documents look good out of the box
- Uses the santisized AsciiDoc document title as PDF filename
- Sets the image-path according your Antora folder structure
- Autodetects
antora.ymlconfigs in order to extract metadata such aspage-component-title, which can be used in themes (i.e. header and footer) - Optionaly Xantora will safe PDF's in attachments folders coresponding to source documents
Known Limitations
- Images referenced outside the documents own Antora module can't be loaded
- Same limitations as with asciidoctor-pdf do apply, see asciidoctor-pdf known-limitations
Development
After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/niwo/xantora. This project is intended to be a safe, welcoming space for collaboration.
License
The gem is available as open source under the terms of the MIT License.