diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-10-23 01:37:33 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-10-23 01:37:33 -0600 |
| commit | 6d2c7a7a30dbb24c2505f55c2d7895d6b69f5580 (patch) | |
| tree | 6409090c86614791ca13b6319b0cfa4fbeaa4735 /docs/modules | |
| parent | 0d40dc34555e077ab4468c88b9fe09480c9ba851 (diff) | |
add tip to docs for how to reference templates on classloader [skip ci]
Diffstat (limited to 'docs/modules')
| -rw-r--r-- | docs/modules/convert/pages/templates.adoc | 7 |
1 files changed, 6 insertions, 1 deletions
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] |
