asciidoctor-vscode icon indicating copy to clipboard operation
asciidoctor-vscode copied to clipboard

Support remote includes

Open apupier opened this issue 2 years ago • 3 comments
trafficstars

Currently remote includes are not resolved (neither in the preview, neither in completion of attributes)

https://docs.asciidoctor.org/asciidoc/latest/directives/include-uri/#reference-include-content-by-uri

example:

include::https://gist.githubusercontent.com/apupier/528a635931932adbdf755303e0116314/raw/f55d188f903ede2a9f3a25c7deeb28046810fe5c/test-remote-attribute.adoc[]

== test

{remote-test}

preview gives: image

apupier avatar Jun 20 '23 09:06 apupier

Did you try with :allow-uri-read:?

ggrossetie avatar Jun 21 '23 20:06 ggrossetie

image

apupier avatar Jun 22 '23 06:06 apupier

setting the allow-uri-read attribute securely from the CLI or API

You need to enable this feature by setting allow-uri-read in your settings (or in your .asciidoctorconfig):

{
    "asciidoc.preview.asciidoctorAttributes": {
        "allow-uri-read": "",
    }
}

Having said that, it does not seems to work inside VS code:

image

ggrossetie avatar Jun 22 '23 15:06 ggrossetie