summaryrefslogtreecommitdiff
path: root/docs/modules/syntax-highlighting
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2020-11-24 15:06:42 -0700
committerSarah White <graphitefriction@gmail.com>2020-12-08 14:32:53 -0700
commit1cf222dc38aa31dacfc3b7c17360ad806e5ee19d (patch)
tree4e8cc40c4cd9814e42ceb3264c203603cbe6431d /docs/modules/syntax-highlighting
parentbab6916f2a8cf7bf3791c08e90aee02dee7a7725 (diff)
clarify that highlightjs-languages only works when generating standalone HTML
Diffstat (limited to 'docs/modules/syntax-highlighting')
-rw-r--r--docs/modules/syntax-highlighting/pages/highlightjs.adoc9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/modules/syntax-highlighting/pages/highlightjs.adoc b/docs/modules/syntax-highlighting/pages/highlightjs.adoc
index 17372031..ab9c2fc3 100644
--- a/docs/modules/syntax-highlighting/pages/highlightjs.adoc
+++ b/docs/modules/syntax-highlighting/pages/highlightjs.adoc
@@ -19,7 +19,11 @@ The version of the highlight.js library Asciidoctor loads from the CDN only incl
== Load support for additional languages
-To load additional languages supported by highlight.js, list them in the value of the `highlightjs-languages` document attribute (separated by commas):
+To load additional languages supported by highlight.js, list them in the value of the `highlightjs-languages` document attribute.
+Separate each language by a comma followed by an optional space.
+
+The common highlight.js bundle does not include support for Rust and Swift.
+Let's set the `highlightjs-languages` attribute so the HTML converter loads support for them into the HTML page.
[source]
----
@@ -27,6 +31,9 @@ To load additional languages supported by highlight.js, list them in the value o
:highlightjs-languages: rust, swift
----
+The `highlightjs-languages` attribute only applies when generating a standalone HTML document (i.e., backend: html, standalone: true).
+It does not work when generating embedded HTML, which is used by site generator integrations such as Antora.
+
== Using a custom highlight.js library
If you'd rather use a personal copy of highlight.js instead of the one hosted on the CDN, follow these steps: