Skip to content

Commit 807e293

Browse files
authored
Document how to run AsciidoctorJ using JBang (#1315)
* Describe how to run AsciidoctorJ using JBang * Describe how to run AsciidoctorJ using JBang * fix: changed Automatic to Automated
1 parent dc7fb78 commit 807e293

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

CHANGELOG.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ For a detailed view of what has changed, refer to the {url-repo}/commits/main[co
1313

1414
== Unreleased
1515

16+
Documentation::
17+
18+
* cli.adoc - describe how to run AsciidoctorJ using JBang
19+
1620
Improvements::
1721

1822
* Upgrade to asciidoctorj-pdf 2.3.19 (#1300)

docs/antora.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ asciidoc:
88
asciidoctorj-epub3-version: 1.5.1
99
asciidoctorj-pdf-version: 2.3.6
1010
jruby-version: 9.4.1.0
11+
url-jbang: https://www.jbang.dev/
1112
url-jruby: https://www.jruby.org/
1213
url-gradle: https://gradle.org
1314
url-repo: https://github.com/asciidoctor/asciidoctorj

docs/modules/ROOT/pages/cli.adoc

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
:url-chocolatey: https://chocolatey.org
44
:url-sdkman: https://sdkman.io
55

6-
There are two basic ways to make AsciidoctorJ available as a command line tool.
6+
There are three basic ways to make AsciidoctorJ available as a command line tool.
77

88
* Manual installation using the binary distribution.
9-
* Automatic installation using a package manager like {url-sdkman}[SDKMAN^] or {url-chocolatey}[Chocolatey^].
9+
* Automated installation using a package manager like {url-sdkman}[SDKMAN^] or {url-chocolatey}[Chocolatey^].
10+
* Directly running AsciidoctorJ using JBang.
1011
1112
== Manual distribution installation
1213

@@ -48,15 +49,17 @@ Linux: asciidoctorj-{artifact-version}/bin/asciidoctorj -b pdf -o READTHIS.pdf R
4849
Windows: asciidoctorj-{artifact-version}\bin\asciidoctorj.bat -b pdf -o READTHIS.pdf README.adoc
4950
----
5051

51-
== Linux and MacOS installation
52+
== Automated distribution installation
53+
54+
=== Linux and MacOS
5255

5356
A {url-sdkman}[SDKMAN!] candidate is available for easy installation in Linux and MacOS.
5457
This will install the binary distribution and set up the PATH automatically.
5558

5659
$ sdk install asciidoctorj
5760
$ asciidoctorj -b pdf README.adoc
5861

59-
== Windows installation
62+
=== Windows
6063

6164
A {url-chocolatey}[Chocolatey] package is available which installs the
6265
asciidoctorj-{artifact-version}-bin.zip Maven artifact along with a
@@ -67,3 +70,19 @@ from the command line.
6770
C:\> where asciidoctorj
6871
C:\ProgramData\chocolatey\bin\asciidoctorj.exe
6972
C:\> asciidoctorj -b pdf README.adoc
73+
74+
== Running AsciidoctorJ using JBang
75+
76+
{url-jbang}[JBang] enables you to run AsciidoctorJ without needing to install it first. As an added benefit, JBang automatically uses the most recent version of AsciidoctorJ, updating it automatically on subsequent runs.
77+
78+
.Linux and MacOS
79+
[source,shellscript]
80+
----
81+
$ jbang run asciidoctorj@asciidoctor -b pdf README.adoc
82+
----
83+
84+
.Windows
85+
[source,shellscript]
86+
----
87+
C:\> jbang run asciidoctorj@asciidoctor -b pdf README.adoc
88+
----

0 commit comments

Comments
 (0)