From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Export results of code literal blocks (Jekyll directory structure) xpost emacs.stackexchange Date: Wed, 28 Jun 2017 15:22:41 +0200 Message-ID: <87zicsfdr2.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQCvf-0004Wc-OG for emacs-orgmode@gnu.org; Wed, 28 Jun 2017 09:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQCve-0006M4-Vz for emacs-orgmode@gnu.org; Wed, 28 Jun 2017 09:22:47 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:40239) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dQCve-0006L8-PR for emacs-orgmode@gnu.org; Wed, 28 Jun 2017 09:22:46 -0400 In-Reply-To: (Jeremy Reeve's message of "Sun, 25 Jun 2017 11:33:39 +1200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jeremy Reeve Cc: emacs-orgmode@gnu.org Hello, Jeremy Reeve writes: > Org-mode newbie here. Please be gentle. Do you have any reason to think we will not be gentle? "We have a squeaker today, class. Isn't he cute?" > I'm trying to follow the recipe for exporting Org-mode documents for > processing by Jekyll. My publishing org-publish-project-alist is > configured to place exported html in my _posts directory and take > images and place them in _posts/assets with org-publish-attachment. > This modification of directory structure seems to be the root of the > problem. [...] > #+RESULTS: [[file:../images/hw1-p3.png]] > > #+BEGIN_EXPORT html >
> src="{{ site.url }}/assets/hw1-p3.png" > alt="Problem 3 visualisation"> >
Problem 3 visualisation
>
> #+END_EXPORT html > > The end result I would like is to have the link to the result of the > literal code block automatically generated either such that it is not > exported as an inline image (as the relative path is incorrect) and be > forced to manually add a correct link for HTML export or have the > inline image link transformed such that it is correct. Can't you write a function that fixes generated links? See `org-export-before-parsing-hook'. > Also, the above snippet exports everything including the "BEGIN > export" which I think shouldn't happen but I'll examine that > separately. The closing line is wrong. It should be "#+end_export". Use `M-x org-lint' to find this kind of problem. Regards, -- Nicolas Goaziou