It's really hard to find the solution since the search engine is always flooded with articles that
only introduce how to start from scratch (mostly taken from quick-start section in document), but don't explin deeper about the details or internal implementations.
These kind of articles are really common on popular "Tech" platforms, because the writer don't need necessarily need to be a user, and they just keep updating.
Another type of search result is StackOverslow, where most user don't know programming :)
* Problem Solving Roadmap
it started with two facts:
1. many other org-powered blog have colorful highlighting
2. color is available when exporting interactively with org-export-dispatch
The something stroke my mind: I haven't searched emacs-china! I then got the [[https://emacs-china.org/t/org-emacs-script-org-publish-all/20782][solution]], partially.
They gave a [[https://orgmode.org/worg/org-faq.html#preserving-faces-during-batch-export][link to FAQ]] and the questioner said it's okey, thus no direct code solution provided in thread.
When I follewed the link and tried out the solution, it didn't work.
I ran ripgrep in the source tree, and found the function =org-export-htmlize-generate-css= [[https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/org/ChangeLog.1?id=229f0b8dd3b92827b6e0c6fc105508e8b80858f5#n7641][last appeared in 2012]].
Now the .el files I had read came into use. I remenbered a similar function in systemcrafter's repo named =org-html-htmlize-generate-css=.
It just [[https://git.sr.ht/~bzg/org-mode/commit/8134e80bdfb55bbce9aecf3f5958a2bd43cc0b63][got renamed]] in these years.
The idea is: export the emacs faces to css and have the corresponding class in html to apply css.
[[https://systemcrafters.net/publishing-websites-with-org-mode/building-the-site/#generating-pages-with-code-blocks][Systemcrafter also mentioned this]] and he said he would make a video on this.
But with too many modes loaded up, the number of duplicated face is enormous and the size of css is more than 50KB!
(The ideal choice is [[gemini://srht.site][srht.site]] gemini hosting, but I don't have available payment mehod now. I'll certainly [[https://ploum.net/2023-02-20-boucle-inspiration.html][migrate from github to sourcehut]] someday)
Exporting to HTML is an okey way to preserve the structure of org, but in gemini, you can M-x org-mode in elpher or open offline files in [[./usenet_and_cli_browsers.org][offpunk]] cache.
I don't want to convert any of my content in other format to .gmi, because any conversion process losses file structure to some extent.
As of post index, I've been writing it manually due to mixed content format. So just write a simple [[https://github.com/dongdigua/dongdigua.github.io/blob/main/misc/mdlist2gmi.py][python script]] to convert entries in .md to Gemini links.