antora-lunr
antora-lunr copied to clipboard
Correlate titles with the search results
Hi! Is there a way to correlate the titles inside a document with the metadata in the search result?
UPDATE: I just saw https://github.com/Mogztter/antora-lunr/blob/13e6afea4f63b9dad88ff4549f8d3403f15f24a5/lib/generate-index.js#L83, can you give a quick explanation of what you have in mind?
What do you think about getting the content of all <p>
and relate them to the closest <h$>
header. Then instead of one doc per page create one doc per section?
Hi Felipe!
It should be possible... I guess it can make sense when you have a relatively small documentation site (and/or really long page)?
But for now you will have to override the generateIndex
function because Antora does not have a built-in mechanism to extend and/or configure a generator.
For now we are using environment variable to enable features but that's far from being a good configuration system :disappointed:
Development continues on https://gitlab.com/antora/antora-lunr-extension/