Skip to content

Commit 5b161e7

Browse files
chore(docs): revise documentation and add Highlight.js extension (#1744)
Co-authored-by: Guillaume Grossetie <[email protected]> Co-authored-by: Guillaume Grossetie <[email protected]>
1 parent 28518ea commit 5b161e7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Asciidoctor.js
33
version: '3.0'
44
asciidoc:
55
attributes:
6-
url-jsdoc-latest: 'http://asciidoctor.github.io/asciidoctor.js/main'
6+
url-jsdoc-latest: 'https://asciidoctor.github.io/asciidoctor.js/main/'
77
nav:
88
- modules/setup/nav.adoc
99
- modules/processor/nav.adoc

docs/modules/extend/pages/extensions/ecosystem.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
:uri-ext-mathjax-gl: https://gitlab.com/djencks/asciidoctor-mathjax.js
1919
:uri-ext-openblock-gl: https://gitlab.com/djencks/asciidoctor-openblock
2020
:uri-ext-template-gl: https://gitlab.com/djencks/asciidoctor-template
21+
:uri-ext-highlight-gh: https://github.com/jirutka/asciidoctor-highlight.js
2122

2223
Here's a list of extensions provided by the awesome community:
2324

@@ -41,6 +42,10 @@ Emoji::
4142
Inline macro to render `emoji:heart[]` as an `<img>` that points to a remote SVG using {uri-twemoji}[Twemoji from Twitter]. +
4243
{uri-ext-emoji-gh}
4344

45+
Highlight.js::
46+
Highlighting source listing blocks using https://highlightjs.org[highlight.js] during document conversion (instead of in browser as the built-in highlight.js support). +
47+
{uri-ext-highlight-gh}
48+
4449
Interactive runner::
4550
Transform AsciiDoc code listings into interactive playgrounds which run in the browser.
4651
Add the `%interactive` option to your `[source]` block. +

docs/modules/setup/pages/quick-tour.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Alternatively, you can use the function `convertFile` to convert a file containi
3737
var doc = asciidoctor.convertFile('/path/to/file.adoc') // <1>
3838
```
3939
<1> The command will output to the file `file.html` in the same directory. +
40-
The variable `doc` will contain an {uri-js-api-doc}/#document[Asciidoctor.Document] object.
40+
The variable `doc` will contain an {url-jsdoc-latest}/#document[Asciidoctor.Document] object.
4141

4242
Alternatively, you can capture the HTML 5 output in a variable instead of writing it to a file:
4343

@@ -60,7 +60,7 @@ var html = asciidoctor.convert(fs.readFileSync('/path/to/file.adoc')) // <1>
6060

6161
== Load and convert
6262

63-
To parse an AsciiDoc file into an {uri-js-api-doc}/#document[Asciidoctor.Document] object:
63+
To parse an AsciiDoc file into an {url-jsdoc-latest}/#document[Asciidoctor.Document] object:
6464

6565
```js
6666
var doc = asciidoctor.loadFile('file.adoc')
@@ -74,7 +74,7 @@ console.log(doc.getAttributes())
7474
```
7575

7676
More than likely, you will want to convert the document.
77-
To convert an {uri-js-api-doc}/#document[Asciidoctor.Document] to HTML5, use the `convert` function on a `Document`:
77+
To convert an {url-jsdoc-latest}/#document[Asciidoctor.Document] to HTML5, use the `convert` function on a `Document`:
7878

7979
```js
8080
var doc = asciidoctor.loadFile('file.adoc')

0 commit comments

Comments
 (0)