[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to export to the simplest possible HTML?
From: |
Ihor Radchenko |
Subject: |
Re: How to export to the simplest possible HTML? |
Date: |
Sat, 03 Jun 2023 05:08:53 +0000 |
Marcin Borkowski <mbork@mbork.pl> writes:
> On 2023-05-30, at 20:45, Marcin Borkowski <mbork@mbork.pl> wrote:
>
>>> Just use `org-export-as'.
>>
>> Thanks again, I didn't know about that function!
>
> I tried playing around with it, but it has one drawback - I can't use it
> to export a subtree containing a link to another subtree, and that is
> something I will definitely need. (I can see why it works that way -
> for that to work, I have to somehow make sure that subtrees containing
> targets of those links are also exported at some point in time - but
> I need another behavior...)
AFAIR, ox-hugo implements what you want here.
> My current idea is to go with a custom exporter derived from the HTML
> one, indeed. Is there a better approach?
You can loop over links in the exported subtree and export any extra if
necessary. For example, in the `org-export-filter-parse-tree-functions'.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>