Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview images from other modules of Antora #358

Open
elsav-emrs opened this issue Aug 8, 2020 · 1 comment
Open

Preview images from other modules of Antora #358

elsav-emrs opened this issue Aug 8, 2020 · 1 comment
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement

Comments

@elsav-emrs
Copy link

elsav-emrs commented Aug 8, 2020

Is your feature request related to a problem? Please describe

In our documentation, we do have a series of common assets to multiple modules, for example the icons. Thus in a document, we may have images coming from multiple sources. We can easily cross-reference within antora but the asciidoc preview in VS does not seem to support this configuration.

modules
|__ module1
   |__ images
   |__ pages
        |__ mydoc.adoc   
             ... Click image:zAll:zButtons/openFile.svg[] ...

|__ zAll
     |__ images
         |__ zButtons
              |__ openFile.svg
     |__ pages
              |__ _attributes.adoc

Note: For preview, we currently configure the attribute imagesdir to "../images", which works fine for most of the images. But we miss these common assets.

Describe the solution you'd like

Preview images to understand the coordinate of a resource, as described here: https://docs.antora.org/antora/2.3/page/resource-id/.

In our case, simply supporting the standard antora infrastructure would be enough.

For example:

[x] Automatically set imagedir from standard antora infrastructure.
Site description: [ site.yml ]

Describe alternatives you've considered

We are beginners to the system and may have not seen alternatives, so any better suggestion is welcome.

Additional context

We have a similar issue with include files. We have a series of common variables that describe product names, zones of interface or reusable sentences.

include::zAll:page$_attributes.adoc[]

For the include, we may opt to use the relative path instead of the ref ID, which will be compatible for the two modes. We are afraid that doing the same for images will make the document reading more complex.

include::../../zAll/pages/_attributes.adoc[]

@elsav-emrs elsav-emrs added 💬 discussion Disccussion on new features, projects, etc... ✨ enhancement labels Aug 8, 2020
@prudhomm
Copy link

it may be a duplicate of #230 , see also #280 for a conditional env to check you are in vscode preview

@danyill danyill mentioned this issue Sep 8, 2021
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement
Projects
None yet
Development

No branches or pull requests

2 participants