From 6d2c7a7a30dbb24c2505f55c2d7895d6b69f5580 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Mon, 23 Oct 2023 01:37:33 -0600 Subject: add tip to docs for how to reference templates on classloader [skip ci] --- docs/modules/convert/pages/templates.adoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/modules/convert/pages/templates.adoc b/docs/modules/convert/pages/templates.adoc index 234158b6..e5ea5d3b 100644 --- a/docs/modules/convert/pages/templates.adoc +++ b/docs/modules/convert/pages/templates.adoc @@ -574,12 +574,17 @@ Either way, the *tilt* and *slim* gems must be available on the load path when r Instructing Asciidoctor to apply your templates is the easiest part. You only need to tell Asciidoctor where the templates are located and which template engine you're using. (Technically, you don't need to specify the template engine. -But, by doing so, it makes the scan more efficient and deterministic.) +However, by doing so, it makes the scan more efficient and deterministic.) 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`). $ asciidoctor -T /path/to/templates -E slim doc.adoc +When using JRuby, you can refer to a directory on the classpath by prefixing the path with `uri:classloader:`. +For example: + + $ asciidoctor -r /path/to/templates.jar -T uri:classloader:/path/to/templates -E slim doc.adoc + 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. [,ruby] -- cgit v1.2.3