Hi everyone,
I wrote a short guide on writing AsciiDoc articles in Leo Editor and thought it might be useful here:
https://wangzhaohe.github.io/swot-learning/leo-editor/Writing-AsciiDoc-in-Leo-Editor.htmlThe setup is simple: an `@button ascii` (Ctrl-/) compiles the current `@adoc` node and opens a live preview, reusing one `live-server` per output file so re-running the button just refreshes the same tab.
The one gotcha worth mentioning: Leo's `compute_opath()` strips up to three extensions (`aaaa.js.adoc` → `aaaa.html`), while Asciidoctor's `xref` only replaces the last `.adoc` (`aaaa.js.html`). The button renames Leo's output with `os.replace()` so links keep working and live-server watches the right file.
Global attributes, a TOC toolbar, and the CSS tweaks live in `options.rb` and `asciidoctor-default.css`. Full code and screenshots are in the post above.
Comments and suggestions welcome.
Best,
wangzhaohe