emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] ox-html: stand-alone export option?


From: Melanie Bacou
Subject: Re: [O] ox-html: stand-alone export option?
Date: Fri, 20 Feb 2015 00:18:46 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Rasmus, see below.

On 2/18/2015 5:39 AM, Rasmus wrote:
Hi Melanie,

Melanie Bacou <address@hidden> writes:

I'm using ox-html to work on shared documents with my
collaborators. We're working off a Dropbox account and converting our
org files to HTML periodically.

Cool.

Problem with all cloud storages is they don't work with relative links
inside HTML (links to external images, CSS, and JS resources).

I use git and ssh to a wm which I guess is different from "cloud storages"
so maybe I don't understand.  If you open the browser of my.html and you
have an absolute path to https://orgmode.org/logo.png the browser would
display it no?  Likewise for img/logo.png.  Probably I've
misunderstood. . .

You're right with Github or remote storages there's no problem (links to images like `./fig/my_fig.png` or local CSS or JS `./css/my_css_.css` are interpreted as usual. The problem is only on cloud storage services like Dropbox where each resource gets a unique (unknown a priori) ID. These make it difficult to publish HTML documents.


We would really benefit from having a "stand-alone" HTML exporter
feature that automatically embeds all external references into one
single HTML file, so they can be shared with Dropbox, Google Drive,
OneDrive and the likes.

Would you base64 encode images and inline code or do you have something
else in mind with single HTML file?  It's not built into Org ATM.

Yes indeed was thinking of a "stand-alone" option that would include base64 encoded images and also verbatim include all local CSS and JS in the document head.


In the short run maybe there's a tool that can do.  For instance, in
Firefox it will save auxiliary material when you save a page.  I don't
know if also save whatever scripts you rely on from whatever CDN far away...

Right, I looked at that too, but no true "stand-alone" option in FF or Chrome, both browsers include resources in a separate folder. Might spend a little more time searching for another utility.


Has this been discussed previously? Would there be any other work around?

I think there was one guy who had patch that would automatically download
external images.  Pretty neat.  I don't know if it was applied in the end.

I'd vote for this feature. In fact I believe it's now an option with RMarkdown/HTML documents.


—Rasmus


--
Melanie BACOU
International Food Policy Research Institute
Snr. Program Manager, HarvestChoice
E-mail address@hidden
Visit www.harvestchoice.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]