Closed HarshKapadia2 closed 9 months ago
There a myriad of ways that this could be implemented and I don't think there is universal agreement on how it should look or work. Instead, I have create a docinfo extension in that lab that adds this widget to the page. See https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/main/lib/back-to-top-docinfo-processor.rb If that garners interested and we can decide how that might be integrated into the built-in HTML converter, then we can consider promoting it.
Add a
:back-to-top-btn:
document attribute using the Intersection Observer API.Example (bottom right):