https://github.com/madduci/docker-asciidoctor-pdf
Dockerized version of Asciidoctor-PDF, useful to generate PDFs from Asciidoc files, including themes
https://github.com/madduci/docker-asciidoctor-pdf
asciidoc-files asciidoctor-pdf pdf
Last synced: 2 months ago
JSON representation
Dockerized version of Asciidoctor-PDF, useful to generate PDFs from Asciidoc files, including themes
- Host: GitHub
- URL: https://github.com/madduci/docker-asciidoctor-pdf
- Owner: madduci
- License: mit
- Created: 2017-07-22T09:53:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-09T03:31:46.000Z (8 months ago)
- Last Synced: 2025-02-12T11:14:21.140Z (4 months ago)
- Topics: asciidoc-files, asciidoctor-pdf, pdf
- Language: Dockerfile
- Size: 23.4 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-asciidoctor-pdf
[](https://github.com/madduci/docker-asciidoctor-pdf/actions/workflows/build.yml)
Dockerized version of Asciidoctor-PDF, useful to generate PDFs from Asciidoc files, including themes, exposing `asciidoctor-pdf` as entrypoint and `/document` as mounted volume where to build the file
To build your own documents as PDF, simply run the container as:
`docker run --rm -v /path/to/your/document/directory:/document madduci/docker-asciidoctor-pdf /document/your_document.adoc`
> Note that it is important to include `/document` ahead of **your_document.adoc** even though that may look strange on account of > your document not being in that directory on your machine. That is how Docker knows how to access your file.
Upon completion, the PDF will reside in the /path/to/your/document/directory.
If you want to use some [custom styles](https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc), just run it as:
`docker run --rm -v /path/to/your/document/directory:/document madduci/docker-asciidoctor-pdf -a pdf-stylesdir=/document/resources/themes -a pdf-style=your_style -a pdf-fontsdir=/document/resources/fonts /document/your_document.adoc`
If your styles are in another directory, then pointing to /document/resources/themes won't work. To accommodate styles in another directory, add another volume, like this
`docker run --rm -v /path/to/your/document/directory/:/document/ -v /path/to/your/themes/directory:/themes madduci/docker-asciidoctor-pdf -a pdf-stylesdir=/themes -a pdf-style=your_style -a pdf-fontsdir=/themes/resources/fonts /document/your_document.adoc`