Identify a suitable element using the docid from the title of the source .adoc
Related to antora#640, which will include the docid in the page UI model. This issue is to use this as the element id for a suitable html element, presumably article
.
Before the docid is available, a possible workaround is to define a generateID
helper:
'use strict'
module.exports = (str) => str.split('/').pop().replace(/\.adoc$/, '')
and modify article.hbs
with
<article class="doc" id="{{generateID page.relativeSrcPath}}">
This workaround assumes that the docid matches the page file name minus .adoc
.
Once docid is available, the article.hbs
change will probably be
<article class="doc" id="{{#with page.docid}} id="{{this}}"{{/with}}">
Edited by David Jencks