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

add imagesdir setting in asciidoctor attributes when antora is enable

Open man-chi opened this issue 11 months ago • 7 comments

problem: many users of asciidoctor would like to use antora as HTML site generation. however, the default image directory structure will be /docs/ROOT/module/images while the *.adoc are stored in /docs/ROOT/module/pages. due to the vscode webpreview permission setting, web preview is unable to display any image::diagram.jpg[my diagram]

proposed solution: as a workaround before Antora is fully supported, I managed to preview images in vscode-asciidoctor web preview by doing the following setting in vscode web preview: • vscode-asciidoc extension > settings > asciidoc >preview : asciidoctor attributes • Edit in settings.json
"asciidoc.preview.asciidoctorAttributes": {
"imagesdir":"../images/"
}

I want to suggest presetting the settings.json
"asciidoc.preview.asciidoctorAttributes": {
"imagesdir":"../images/"
} when the Antora checkbox is enabled in the extension setting

man-chi avatar Mar 16 '24 07:03 man-chi