Skip to content

Commit f5827bb

Browse files
committed
automatically link to the javadoc of selected version
1 parent c6fb9bd commit f5827bb

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
module.exports.register = function registerJavadocLinkAttribute(registry) {
4+
registry.preprocessor(function () {
5+
this.process((doc, reader) => {
6+
const pageVersion = doc.getAttribute('page-version') || doc.getAttribute('page-component-version')
7+
doc.setAttribute('link-javadoc', `https://javadoc.jmonkeyengine.org/${pageVersion}`)
8+
return reader
9+
})
10+
})
11+
}

wiki-playbook.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ asciidoc:
3333
orgname: 'jMonkeyEngine'
3434
# Site wide setting of javaDoc url. Soft set using '@' allows override at
3535
# component and page level.
36-
link-javadoc: 'https://javadoc.jmonkeyengine.org/v3.4.1-stable@'
36+
link-javadoc: 'https://javadoc.jmonkeyengine.org/latest@'
3737
# Enables the UI macros (button, menu and kbd)
3838
experimental: ''
3939
# Adds an anchor in front of the section title when the mouse cursor hovers
@@ -43,6 +43,7 @@ asciidoc:
4343
# Twitter Emoji
4444
# see: https://github.com/Mogztter/asciidoctor-emoji
4545
- asciidoctor-emoji
46+
- ./lib/javadoc-link-attribute-extension.js
4647
runtime:
4748
cache_dir: ./.cache/antora
4849
fetch: true

0 commit comments

Comments
 (0)