From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Some hacks on top of org-publish
Date: Sat, 28 Dec 2024 23:26:34 -0500 [thread overview]
Message-ID: <CAAQmekfXfnvXkib5+zNXN9AAau=cxHLUmMQC=QffM-XcNHfdDA@mail.gmail.com> (raw)
In-Reply-To: <87ikr7zxdj.fsf@localhost>
On Wed, Dec 25, 2024 at 8:47 AM Ihor Radchenko <yantar92@posteo.net> wrote:
>
> Nikolaos Chatzikonstantinou <nchatz314@gmail.com> writes:
>
> > 3) Source code blocks + colors (server-side; not a .js coloring client-side)
>
> Note that ox-html can fontify src blocks by itself. Via htmlize + CSS styles.
>
> > 1) I got colors in source blocks by post-processing with node.js +
> > highlight.js the raw HTML. Is it possible to write my own backend that
> > feeds the source block into my node app?
>
> Yes, of course. See my next answers. The whole export proces is hackable
> on multiple levels.
>
> > 2) I got several issues with how the org files are exported as HTML,
> > for example I may want to insert an <article> tag, I may want a div
> > around content and a div around nav bar, etc. Not everything can be
> > solved with #+HTML: tags because I don't have precise control of where
> > those go. Can the HTML backend be edited or do I have to write my own
> > backend?
>
> Check out https://orgmode.org/manual/Advanced-Export-Configuration.html
>
> > 3) I am very inexperienced with org backends. What good resources are
> > out there for this subject?
>
> See https://orgmode.org/manual/Adding-Export-Backends.html
> Org export backends can use inheritance. So, if you need to re-define a
> part of backend (if filters are not enough), you can always create a
> "subclass" by creating a "derived" backend.
I should probably try to do this, but I got inspired by Worg's website
which does not do any backend hacking as far as I can tell, but
instead puts some javascript to collapse the table of contents. If you
check my blog now, it looks almost OK in mobile phones. I do want to
write the backend stuff, but it feels like such a chore. The
ox-latex.el (which the manual gives as an example of a not-derived
backend) is a bit overengineered for my taste, in the sense that I
need to pay a lot of attention to figure it out.
Do you have a particular backend for me to look at as a recommendation
of an easy source? I don't want it to be derived because I want to
understand the whole process.
Regards,
Nikolaos Chatzikonstantinou
next prev parent reply other threads:[~2024-12-29 4:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 17:45 Some hacks on top of org-publish Nikolaos Chatzikonstantinou
2024-12-25 13:48 ` Ihor Radchenko
2024-12-26 15:48 ` Nikolaos Chatzikonstantinou
2024-12-27 17:32 ` Ihor Radchenko
2024-12-29 4:17 ` Nikolaos Chatzikonstantinou
2024-12-29 4:26 ` Nikolaos Chatzikonstantinou [this message]
2024-12-30 18:14 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAQmekfXfnvXkib5+zNXN9AAau=cxHLUmMQC=QffM-XcNHfdDA@mail.gmail.com' \
--to=nchatz314@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).