emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Some hacks on top of org-publish
@ 2024-12-19 17:45 Nikolaos Chatzikonstantinou
  0 siblings, 0 replies; only message in thread
From: Nikolaos Chatzikonstantinou @ 2024-12-19 17:45 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I spent the past couple of days hacking together this new blog based
on org-publish that I'd like to show you (comments welcome!):

Blog: <https://createyourpersonalaccount.github.io/blog-v2/>
git repo: <https://github.com/createyourpersonalaccount/blog-v2>

The highlights are that I got

1) MathJax to work
2) TikZ commutative diagrams to work as SVG files
3) Source code blocks + colors (server-side; not a .js coloring client-side)
4) A nice navigation sidebar
5) I get to preview locally if I want but also I have a GitHub
workflow that automatically builds my blog; both views are the same.

In this format all I have to do is add .org files under the
content/pages/ directory (and .tex files under the content/img/
directory for the commutative diagrams) and run `make` and the static
blog is built.

I know there's several ways to improve but I want to bring a couple of
points where you might be able to help me:

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?
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?
3) I am very inexperienced with org backends. What good resources are
out there for this subject?

Finally a highlight of the hacks I had to pull off: apparently
#+INCLUDE: will strip away inline backend information such as
@@html:<b>@@. I figured out that if I write something like
@@html@@a:@@:<b>@@, only the inner @@a:@@ is recognized and stripped,
which leaves me with what I originally wanted! (see
<https://github.com/createyourpersonalaccount/blog-v2/blob/main/content/publish.el#L14-L20>)

Regards,
Nikolaos Chatzikonstantinou


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-19 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 17:45 Some hacks on top of org-publish Nikolaos Chatzikonstantinou

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).