Skip to content

Commit ec732b2

Browse files
committed
Add Asciidoctor Web PDF
1 parent a609624 commit ec732b2

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARG asciidoctor_revealjs_version=4.1.0
1212
ARG kramdown_asciidoc_version=2.0.0
1313
ARG asciidoctor_bibtex_version=0.8.0
1414
ARG asciidoctor_kroki_version=0.5.0
15+
ARG asciidoctor_web_pdf_version=v1.0.0-alpha.14
1516

1617
ENV ASCIIDOCTOR_VERSION=${asciidoctor_version} \
1718
ASCIIDOCTOR_CONFLUENCE_VERSION=${asciidoctor_confluence_version} \
@@ -23,7 +24,8 @@ ENV ASCIIDOCTOR_VERSION=${asciidoctor_version} \
2324
ASCIIDOCTOR_REVEALJS_VERSION=${asciidoctor_revealjs_version} \
2425
KRAMDOWN_ASCIIDOC_VERSION=${kramdown_asciidoc_version} \
2526
ASCIIDOCTOR_BIBTEX_VERSION=${asciidoctor_bibtex_version} \
26-
ASCIIDOCTOR_KROKI_VERSION=${asciidoctor_kroki_version}
27+
ASCIIDOCTOR_KROKI_VERSION=${asciidoctor_kroki_version} \
28+
ASCIIDOCTOR_WEB_PDF_VERSION=${asciidoctor_web_pdf_version}
2729

2830
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
2931
# Minimal image with asciidoctor
@@ -100,7 +102,8 @@ RUN apk add --no-cache \
100102
tzdata \
101103
unzip \
102104
which \
103-
font-noto-cjk
105+
font-noto-cjk \
106+
nodejs
104107

105108
# Installing Ruby Gems for additional functionality
106109
RUN apk add --no-cache --virtual .rubymakedepends \
@@ -142,6 +145,9 @@ RUN apk add --no-cache --virtual .pythonmakedepends \
142145
seqdiag \
143146
&& apk del -r --no-cache .pythonmakedepends
144147

148+
# Installing Nodejs dependencies for additional functionality
149+
RUN npm install --global @asciidoctor/core asciidoctor-pdf
150+
145151
COPY --from=build-haskell root/.cabal/bin/erd /bin/
146152

147153
WORKDIR /documents

README.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
:KRAMDOWN_ASCIIDOC_VERSION: 2.0.0
1111
:ASCIIDOCTOR_BIBTEX_VERSION: 0.8.0
1212
:ASCIIDOCTOR_KROKI_VERSION: 0.5.0
13+
:ASCIIDOCTOR_WEB_PDF_VERSION: v1.0.0-alpha.14
14+
ifdef::env-github[]
15+
:tip-caption: :bulb:
16+
:note-caption: :information_source:
17+
:important-caption: :heavy_exclamation_mark:
18+
:caution-caption: :fire:
19+
:warning-caption: :warning:
20+
endif::[]
1321
= Asciidoctor Docker Container
1422
:source-highlighter: coderay
1523

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

3847

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

123+
* To convert files with Asciidoctor Web PDF:
124+
+
125+
[source, bash]
126+
----
127+
asciidoctor-web-pdf document.adoc
128+
----
129+
114130
== How to contribute / do it yourself?
115131

116132
=== Requirements

0 commit comments

Comments
 (0)