Skip to content

Commit

Permalink
Add Asciidoctor Web PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
diguage committed Mar 6, 2022
1 parent a609624 commit ec732b2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ARG asciidoctor_revealjs_version=4.1.0
ARG kramdown_asciidoc_version=2.0.0
ARG asciidoctor_bibtex_version=0.8.0
ARG asciidoctor_kroki_version=0.5.0
ARG asciidoctor_web_pdf_version=v1.0.0-alpha.14

ENV ASCIIDOCTOR_VERSION=${asciidoctor_version} \
ASCIIDOCTOR_CONFLUENCE_VERSION=${asciidoctor_confluence_version} \
Expand All @@ -23,7 +24,8 @@ ENV ASCIIDOCTOR_VERSION=${asciidoctor_version} \
ASCIIDOCTOR_REVEALJS_VERSION=${asciidoctor_revealjs_version} \
KRAMDOWN_ASCIIDOC_VERSION=${kramdown_asciidoc_version} \
ASCIIDOCTOR_BIBTEX_VERSION=${asciidoctor_bibtex_version} \
ASCIIDOCTOR_KROKI_VERSION=${asciidoctor_kroki_version}
ASCIIDOCTOR_KROKI_VERSION=${asciidoctor_kroki_version} \
ASCIIDOCTOR_WEB_PDF_VERSION=${asciidoctor_web_pdf_version}

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Minimal image with asciidoctor
Expand Down Expand Up @@ -100,7 +102,8 @@ RUN apk add --no-cache \
tzdata \
unzip \
which \
font-noto-cjk
font-noto-cjk \
nodejs

# Installing Ruby Gems for additional functionality
RUN apk add --no-cache --virtual .rubymakedepends \
Expand Down Expand Up @@ -142,6 +145,9 @@ RUN apk add --no-cache --virtual .pythonmakedepends \
seqdiag \
&& apk del -r --no-cache .pythonmakedepends

# Installing Nodejs dependencies for additional functionality
RUN npm install --global @asciidoctor/core asciidoctor-pdf

COPY --from=build-haskell root/.cabal/bin/erd /bin/

WORKDIR /documents
Expand Down
16 changes: 16 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
:KRAMDOWN_ASCIIDOC_VERSION: 2.0.0
:ASCIIDOCTOR_BIBTEX_VERSION: 0.8.0
:ASCIIDOCTOR_KROKI_VERSION: 0.5.0
:ASCIIDOCTOR_WEB_PDF_VERSION: v1.0.0-alpha.14
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
= Asciidoctor Docker Container
:source-highlighter: coderay

Expand All @@ -34,6 +42,7 @@ This Docker image provides:
* https://github.com/asciidoctor/asciidoctor-confluence[Asciidoctor Confluence] {ASCIIDOCTOR_CONFLUENCE_VERSION}
* https://github.com/asciidoctor/asciidoctor-bibtex[Asciidoctor Bibtex] {ASCIIDOCTOR_BIBTEX_VERSION}
* https://github.com/Mogztter/asciidoctor-kroki[Asciidoctor Kroki] {ASCIIDOCTOR_KROKI_VERSION}
* https://github.com/Mogztter/asciidoctor-web-pdf[Asciidoctor Web PDF^] {ASCIIDOCTOR_WEB_PDF_VERSION}


This image uses Alpine Linux {ALPINE_VERSION} as base image.
Expand Down Expand Up @@ -111,6 +120,13 @@ asciidoctor-revealjs -a revealjsdir=https://cdnjs.cloudflare.com/ajax/libs/revea
docker run --rm -v $(pwd):/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf index.adoc
----

* To convert files with Asciidoctor Web PDF:
+
[source, bash]
----
asciidoctor-web-pdf document.adoc
----

== How to contribute / do it yourself?

=== Requirements
Expand Down

0 comments on commit ec732b2

Please sign in to comment.