Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ For a detailed view of what has changed, refer to the {url-repo}/commits/main[co

== Unreleased

Documentation::

* cli.adoc - describe how to run AsciidoctorJ using JBang

Improvements::

* Upgrade to asciidoctorj-pdf 2.3.19 (#1300)
Expand Down
1 change: 1 addition & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ asciidoc:
asciidoctorj-epub3-version: 1.5.1
asciidoctorj-pdf-version: 2.3.6
jruby-version: 9.4.1.0
url-jbang: https://www.jbang.dev/
url-jruby: https://www.jruby.org/
url-gradle: https://gradle.org
url-repo: https://github.com/asciidoctor/asciidoctorj
Expand Down
25 changes: 22 additions & 3 deletions docs/modules/ROOT/pages/cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
:url-chocolatey: https://chocolatey.org
:url-sdkman: https://sdkman.io

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

* Manual installation using the binary distribution.
* Automatic installation using a package manager like {url-sdkman}[SDKMAN^] or {url-chocolatey}[Chocolatey^].
* Directly running AsciidoctorJ using JBang.

== Manual distribution installation

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

== Linux and MacOS installation
== Automatic distribution installation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit unsure about the term "Automatic distribution installation".
What exactly does that mean?

Copy link
Member Author

@wfouche wfouche Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the orginal starting text as reference which talks about "automatic installation".

There are two basic ways to make AsciidoctorJ available as a command line tool.

* Manual installation using the binary distribution.

* Automatic installation using a package manager like SDKMAN or Chocolatey.

Most likely the word the writer had in mind was Automated instead of Automatic.

Automated distribution installation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wonder if I wrote this :D
Yes, I think automated sounds better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robertpanzer , will this update appear at https://docs.asciidoctor.org/asciidoctorj/latest/cli/ automatically or will the docs site only be updated when a future release of asciidoctorj becomes available? Was hoping to see the update appear sooner rather than later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs pull from the main branch (see https://github.com/asciidoctor/docs.asciidoctor.org/blob/main/antora-playbook.yml#L39-L41), so the update will be seen after the nightly run. I can go ahead and trigger it now.


=== Linux and MacOS

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

$ sdk install asciidoctorj
$ asciidoctorj -b pdf README.adoc

== Windows installation
=== Windows

A {url-chocolatey}[Chocolatey] package is available which installs the
asciidoctorj-{artifact-version}-bin.zip Maven artifact along with a
Expand All @@ -67,3 +70,19 @@ from the command line.
C:\> where asciidoctorj
C:\ProgramData\chocolatey\bin\asciidoctorj.exe
C:\> asciidoctorj -b pdf README.adoc

== Running AsciidoctorJ using JBang

{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.

.Linux and MacOS
[source,shellscript]
----
$ jbang run asciidoctorj@asciidoctor -b pdf README.adoc
----

.Windows
[source,shellscript]
----
C:\> jbang run asciidoctorj@asciidoctor -b pdf README.adoc
----
Loading