asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
340 stars 97 forks source link

Kroki diagrams are not embedded in the HTML export in v3.0.3 #683

Open AshkanV opened 1 year ago

AshkanV commented 1 year ago

The Kroki diagrams is not embedded in the HTML output and only a link to the image is generated which always requires the server. I use this combination:

:data-uri:
:allow-uri-read:
:kroki-default-format: svg
:kroki-default-options: interactive
:kroki-fetch-diagram!: 

If I remove the ! char from kroki-fetch-diagram or use inline instead of interactive no diagram is generating at all.

In v2.9.8 I was using the Ruby version of Asciidoctor which generates an embedded interactive SVG diagram with no problem. But as there will be no support for the Ruby version in version 3, I can not generate standalone HTML export anymore with the AsciidoctorJS version.

Also as it is stated on the Kroki extension repo, I think the extension can generate diagrams with both inline and interactive options.

VSCode: 1.74 (tar.gz version) AsciiDoctor VSCode: 3.0.3 OS: Linux openSUSE 15.4

(This bug report is created to make a separate issue for each item in #681)

ggrossetie commented 1 year ago

Probably related to https://github.com/Mogztter/asciidoctor-kroki/issues/397

bohni commented 1 year ago

As long as there are no generated or embeded images, the img src URL should render the configured server

eg

settings.json:

{
    "asciidoc.extensions.enableKroki": true,
    "asciidoc.preview.asciidoctorAttributes": {
        "kroki-fetch-diagram": false,
        "kroki-server-url": "http://my-kroki-server:8000"
    },
}