UP | HOME

Setup of my blog (with gemtext)

Blogging in emacs   emacs blogging gemini

emacs.png

Most boring, if you have a look at all this useless amateur blogs, is their first post about their fancy and mostly unecessary complex setup of their blogs / phlogs / gemlogs, or however they call their opus novum.

So - lets follow this stupid tradition, as today I tried finally to set up a kind of blog in emacs utilizing org-mode. I love emacs and org-mode - so, using them for blogging is quite a natural choice. Not an outstanding path to go, as many nerds have a similar setup.

org-mode-unicorn.svg

Including gemini as publishing channel

The kind of challenge - I want to publish my great blog with dubious content on at least the following channels:

  • HTML aka WWW: accessible via the good old browser on your desktop computer or even fancier on your phone.
  • Gemini: the new rising star in the fediverse and retro computing world - a refurbished way of gopher. More secure(?) and reasonable content types for today's computing compared to good old gopher.1

Happily - I found a back-end for orgmode, that (should) be capable of publishing to gemtext: ox-gemini.

If you are aware of gemtext, you'll probably agree, that this is quite a thing, because of the difference (not saying limitations) of gemtext compared to org structure or rather html.

Setting this up was quite simple - just adding a publishing-function to the alist org-publish-project-alist, f.e.:

;;... excerpt out of my org-publish-project-alist:
("blog-main-gemini"
 :base-directory "~/org/blog/src/"
 :base-extension "org"
 :publishing-directory "~/org/blog/publish-gmi/"
 :recursive t
 :publishing-function  (org-gemini-publish-to-gemini)
 :headline-levels 3  ; reduced to 2, as gemtext is limited to #, ## and ### 
 :auto-preamble nil
 :with-toc nil)
;;...

ox-gemini deals quite well with links, during the text an anchor is shown in square brackets, and at the end of the section actual gemtext-links are placed.

The only improvements I would like to have, f.e. if there is just one link in a line, or already an enumeration, that actual gemlinks would be generated. AND - support of footnotes.

Helpful links

Footnotes:

Date: 2022-10-08 Sat 00:00

Author: Otto Diesenbacher-Reinmüller

Validate