Hello,
I am with Asciidoctor 0.1.4 and I have found something that I think that would be amazing to implement too (maybe it is already implemented but I am missing something). I have got the next document: = My title foo <foo@gmail.com> :data-uri: :allow-uri-read: I think this is Firefox logo image:http://upload.wikimedia.org/wikipedia/commons/f/ff/Mozilla_Firefox_logo_2013.png[Firefox, 25, 25] but image is not embeded, but only referenced. I think it would be good to implement the same strategy as in include macro so Asciidoctor could download the image from URI and embed inside document. WDYT? |
If this isn't doable yet I'm pretty sure we've at least talked about this sort of thing. One would need to go back through the archives to find out for sure though. I do agree this can be a useful feature (with the correct security settings of course).
On Thu, Sep 12, 2013 at 6:29 AM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hello, |
Has any of you implemented this? I mean, a good workflow to download the remote images?
I have a bunch of logos I need to embed into the documentation I am building and I don't want to add them to git. Thanks! |
I fear not.
So far you can pass the `data-uri` param (embeddAssets if using the maven plugin) to embed CSS and images, but only those in a local folder, URI resources are linked :/ I think a good approach could be a simple extension that downloads all images to a temp folder, once files are rendered, the folder can be deleted. It would also allow you to throw any exception/warning in case a resource is not found and abort the process, providing some validation if you'r using some CI. |
Yes for now the best way is by an extension in fact you need to create a inline macro processor extension and a postprocessor to delete the images. 2014-10-24 8:26 GMT+02:00 abelsromero [via Asciidoctor :: Discussion] <[hidden email]>: I fear not. +----------------------------------------------------------+ Alex Soto Bueno - Computer Engineer www.lordofthejars.com +----------------------------------------------------------+ |
Administrator
|
I have good news! This feature made it into Asciidoctor 1.5.0. Here are the details: Give it a try and let me know if you have any trouble making it work. There's a small chance the information in the issue report is out of date, so follow through to the commit to discover any additional details if you have trouble. Cheers, -Dan On Fri, Oct 24, 2014 at 12:30 AM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |