Hi Dan !
Sorry, I'm a bit late on this thread.
Thanks for the long explanation, but I can't get it working with awestruct-0.5.4.rc2 with asciidoctor-0.1.4.
No matter what I put in the document header or in a custom extension, the value defined in _config/site.yml is still used, even though I suffixed it with '@' as you suggested.
Here's what I have now:
- in _site/config.yml:
---
asciidoctor:
:safe: safe
:attributes:
imagesdir: /images@
icons: font
---
- in my adoc file:
---
:awestruct-imagesdir: /features
...
image::images/features-openshift-applicationwizard-reduced.png[OpenShift Application Wizard]
---
in a custom awestruct extension, I specify the 'page.imagesdir' value by setting something like 'http://localhost:4242/features'
At the end of the build, the generated HTML for the images is something like:
<img src="/images/images/features-openshift-applicationwizard-reduced.png" alt="OpenShift Application Wizard">
The generated path starts with '/images/images/..', which means that the default imagesdir value from _config/site.yml was used.
Ideally, I would like to have an absolute path because the site currently deployed on github, so I need to preprend the site context (which is configured in my staging profile). This is why I was hoping to have the custom extension working.
Note: this works fine with awestruct-0.5.3 but we need to migrate to a more recent version because some users run it on MacOSX Mavericks.
I like very much the idea that a relative path should be used with awestruct while still letting github render the page and display the images, which is why I'm trying to find the right configuration.
Thanks.
Xavier
http://discuss.asciidoctor.org/setting-imagesdir-for-asciidoc-articles-baked-with-awestruct-tp528p1035.htmlIf you reply to this email, your message will be added to the discussion below:To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
Free forum by Nabble | Edit this page |