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

Support Antora and images relative to the catalog root #230

Open
vincent-smit opened this issue Oct 19, 2019 · 3 comments
Open

Support Antora and images relative to the catalog root #230

vincent-smit opened this issue Oct 19, 2019 · 3 comments
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement

Comments

@vincent-smit
Copy link

Currently, it's not possible to preview images when you use this plugin to create AsciiDoc documents for use with Antora. This is because, and I quote Dan Allen (creator of AsciiDoctor):

the tools need to evolve. that's my position. this is critical, because that's how the image macro was always designed to work. to be relative to the catalog root, not a relative path fishing around the filesystem for the image.

Solution

Support AsciiDoctors image macro so images can be found within a ./images folder that is relative to the root directory of the documents. If this plugin detects an .adoc file (or other extension) is contained within a ./pages folder, it should look in the root directory for a ./images folder and interpreter image references to that folder.

For more information; check the AsciiDoctor manual regarding the imagedir attribute.

@vincent-smit vincent-smit added 💬 discussion Disccussion on new features, projects, etc... ✨ enhancement labels Oct 19, 2019
@mojavelinux
Copy link
Member

mojavelinux commented Oct 19, 2019

Understand that when I say, the "tools need to evolve" it isn't because they did anything wrong or aren't keeping up. It's merely that we are evolving the reach of the language and the tools will need to evolve in response. So hopefully it's implied that we'll work together on this.

We shouldn't frame this as "supports Antora's xref macro" or "supports Antora's image macro". It's 100% valid AsciiDoc. What we are aiming to support is an implicit project structure. In other words, certain settings that can be auto-configured based on the plugin recognizing the Antora structure. That's the key value of having a standard project structure for documentation, as we first pitched here: https://opendevise.com/blog/standard-project-structure-for-docs/

@mojavelinux
Copy link
Member

I should point out that the project structure can be used even if you're not using Antora (though likely most will be).

@prudhomm
Copy link

prudhomm commented Mar 21, 2020

is there a workaround ? I added #280 which may be a duplicate of this issue.
I am enforcing a certain layout to my documents in antora (thanks to antora) and the relative path to reach the images in github works fine most of the time however I haven't managed to do it in vscode, yet

@danyill danyill changed the title Support relative images to the catalog root Support Antora and images relative to the catalog root Mar 24, 2020
@danyill danyill mentioned this issue Sep 8, 2021
16 tasks
patrick-stephens added a commit to couchbaselabs/observability that referenced this issue Nov 10, 2021
Switching now to all user documentation must be in Asciidoc. Dev documentation still in Markdown as not part of the CMOS generation.

Refactored current auto-generated documentation to split it up into more appropriate pages - still some work to do for duplication and updates of examples/config.
Image links work in the generated HTML, Github rendering seems to not support an Antora folder structure, e.g. asciidoctor/asciidoctor-vscode#230

Landing page for repo is simplified now just to reference to the Asciidoc pages.
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

3 participants