Skip to content

Commit 6d2c7a7

Browse files
committed
add tip to docs for how to reference templates on classloader [skip ci]
1 parent 0d40dc3 commit 6d2c7a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/modules/convert/pages/templates.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,12 +574,17 @@ Either way, the *tilt* and *slim* gems must be available on the load path when r
574574
Instructing Asciidoctor to apply your templates is the easiest part.
575575
You only need to tell Asciidoctor where the templates are located and which template engine you're using.
576576
(Technically, you don't need to specify the template engine.
577-
But, by doing so, it makes the scan more efficient and deterministic.)
577+
However, by doing so, it makes the scan more efficient and deterministic.)
578578

579579
If you're using the CLI, you specify the template directory using the `-T` option (longhand: `--template-dir`) and the template engine using the `-E` option (longhand: `--template-engine`).
580580

581581
$ asciidoctor -T /path/to/templates -E slim doc.adoc
582582

583+
When using JRuby, you can refer to a directory on the classpath by prefixing the path with `uri:classloader:`.
584+
For example:
585+
586+
$ asciidoctor -r /path/to/templates.jar -T uri:classloader:/path/to/templates -E slim doc.adoc
587+
583588
If you're using the API, you specify the template directory (or directories) using the `:template_dirs` option and the template engine using the `:template_engine` option.
584589

585590
[,ruby]

0 commit comments

Comments
 (0)