Skip to content

Commit

Permalink
Fail docs generation when asciidoctor pdf command is missing (#3819)
Browse files Browse the repository at this point in the history
pderop authored May 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 56b89f8 commit 6a2b97a
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -99,7 +99,18 @@ Then you can build the antora documentation like this:
./gradlew docs
```

The documentation is generated in `docs/build/site/index.html` and in `docs/build/distributions/reactor-core-<version-docs.zip`
The documentation is generated in `docs/build/site/index.html` and in `docs/build/distributions/reactor-core-<version>-docs.zip`
If a PDF file should also be included in the generated docs zip file, then you need to specify `-PforcePdf` option:

```shell
./gradlew docs -PforcePdf
```
Notice that PDF generation requires the `asciidoctor-pdf` command to be available in the PATH.
For example, on Mac OS, you can install such command like this:

```shell
brew install asciidoctor
```

## Getting Started

2 changes: 1 addition & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ antora {
logger.log(LogLevel.DEBUG, "enabling antora pdf-extension")
options.add('--extension=pdf-extension')
} else {
logger.lifecycle("PDF not generated, asciidoctor-pdf not found from the PATH.")
throw new GradleException("PDF cannot be generated, asciidoctor-pdf not found from the PATH.")
}
}

0 comments on commit 6a2b97a

Please sign in to comment.