asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
141 stars 42 forks source link

Unable to see images in project with Antora folder structure #298

Closed KLynn2019 closed 5 years ago

KLynn2019 commented 5 years ago

Description

Projects used with Antora have to follow a specific folder structure. With this structure, it's not necessary to include the exact path to an image in the source document. However, in order to see the image in the preview pane, I have to specify the path. Is there a way to customize the preview so that I don't have to do this?

The attached zip file contains the following:

SampleFiles.zip

ggrossetie commented 5 years ago

As a workaround you can define the attachmentsdir, examplesdir, imagesdir and partialsdir attributes:

Capture d’écran 2019-08-13 à 11 32 23

It's also possible to include the attributes in each document using the include directive:

Capture d’écran 2019-08-13 à 11 34 32

Capture d’écran 2019-08-13 à 11 34 46

The Atom extension could potentially detect that an antora.yml file exists in the folder structure to automatically define these attributes.

KLynn2019 commented 5 years ago

That did it! Thank you very much for your help.

AndersonDev commented 5 years ago

Any native support? Brackets supports all of this. But I like Atom more. Please add this to some config!

ggrossetie commented 5 years ago

@AndersonDev As far as I know, you can manually configure the imagesdir in the preview for Adobe Brackets but it does not automatically resolve the imagesdir (ie. it does not automatically detect an Antora project) right ?

It's also possible to configure attributes in the settings page of this package:

config-imagesdir