Open tariano opened 7 years ago
It's important to keep in mind that the preview produces an embeddable document. That means features that rely on a standalone document, such as docinfo, must be implemented by the preview plugin. The preview plugin could honor the docinfo attribute, read the appropriate file, and insert the result into the frame. Where exactly it should be inserted is up to the preview plugin to define.
It's worth noting that the way the Chrome extension handles this is allow extra JavaScript and CSS files to be added. However, those are global, so it's not as nice as being able to have supplemental content per document. (Though I still think the preview needs to have user themes, but that's a separate issue).
Description
I found no mention for docinfo files in the repository, and in the light of this, as expected, using
docinfo
file doesn't work in preview:I successfully created a docinfo file, named
docinfo.html
in the same location ofmy-doc.adoc
document. In thatdocinfo.html
I put:I added
:docinfo: shared
inmy-doc.adoc
as required.And after executing
asciidoctor my-doc.adoc
, any text marked with[gui]#GUI Text#
was correctly emitted with thegui
class, displaying the right background color.However using this
atom-asciidoc-preview
extension in Atom, I noticed that the preview doesn't display the right background color - it doesn't heeddocinfo.html
whatsoever.asciidoc-preview
version: 2.10.0language-asciidoc
version: 1.10.0