I just thought of a better way to explain the page-* attributes. The page-* attributes are for passing information up to Awestruct. Attributes such as imagesdir are for passing information down to Asciidoctor.
I recognize that a table to explain this would be nice to have. I think we'll add a section to the Asciidoctor user manual to explain this integration.
-Dan
Xavier,
You've got it! That explanation is spot on.
I'll clarify that the awestruct-* attributes are only used to define a limited set of what Awestruct recognizes, and it's not correlated with Asciidoctor rendering behavior. It's more about the layout & handling of the page. You typically only use that syntax to set the following:
* awestruct-layout
* awestruct-tags (for the blog)
* awestruct-javascripts (requires custom logic in main template)Also, the awestruct- prefix is deprecated in favor of page- for these attributes.
To configure AsciiDoc output globally, you define attributes in _config/site.yml as you have discovered.
I look forward to checking out your new site!
Cheers,
Dan
On Dec 3, 2013 10:25 AM, "xcoulon [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hello,
Just to keep you posted, I found the solution to my problem, thanks to the hints I got in previous replies.
It turns out that I just needed to set the following config (in _site/config.yml):
asciidoctor:
:safe: safe
:attributes:
imagesdir: .
icons: font
and then use the following syntax in my .adoc files:
image::images/whatever.png
assuming that the images are in a subfolder of the current document.
Even cooler, it works both when building our site with awestruct and when looking at the document rendered in HTML on github \o/
Again, thanks for your help!
Best regards,
Xavier
If you reply to this email, your message will be added to the discussion below:http://discuss.asciidoctor.org/setting-imagesdir-for-asciidoc-articles-baked-with-awestruct-tp528p1173.htmlTo 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 |