by dskhatri on 3/4/25, 4:13 PM with 11 comments
by adityaathalye on 3/7/25, 12:25 PM
Plus org-babel lets me pull tricks like this:
I want to insert certain HTML fragments in some pages, arbitrarily. There is no sensible way to automate it. BUT, I can source my HTML templates inside any org file, and manually expand it in-line. Like so:
#+BEGIN_SRC bash :results raw html :exports results
source ../bin/templates.sh
shite_template_common_org_inline_sales_banner "."
#+END_SRC
#+RESULTS:
#+begin_export html
<the neatly in-lined HTML>
#+end_export
That expands to this sales banner https://www.evalapply.org/index.html#standing-invitation (which is also expanded similarly in my hire.org and now.org pages).Nifty!!!
[1] https://github.com/adityaathalye/shite/ is my little hot-reloadin' site maker from shell. I write all of https://evalapply.org with it!
[2] Recently discussed at HN: https://news.ycombinator.com/item?id=43157672 "Why and How I use “Org Mode” for my writing and more (2022)"
by AnonHP on 3/7/25, 11:52 AM
> I want websites to be written to a single org file,
Since the entire site’s source is in one file, this means individual blog entries (the index.html files) do not by default have their original date after the build and publish, right? For example, if the blog was built and published with one post yesterday and I add one more post today, build and publish, does it mean that both the blog posts on the web server would show up with today’s date/time as when they were modified/updated? If yes, wouldn’t this affect things like browser caching, search engine crawlers, etc.?
by shortrounddev2 on 3/7/25, 12:05 PM
> Have you ever wanted [...] > "html templates" that are plain Emacs Lisp data,
I can honestly say I've never wanted to write HTML in another language. Html is fine, I'm not sure what the benefit of reimplementing it in other languages is. I see this in python a lot too
by zck on 3/7/25, 6:09 PM
1. Write HTML in org-mode. Org-mode is great for thinking. 2. Publish clean HTML.
The other libraries I was seeing were about exporting arbitrary org files for being consumed online. For example, the built-in exporter has a bunch of html classes that include "org" in them.
So I built a custom exporter: https://hg.sr.ht/~zck/ox-zhtml. It's definitely not documented well, but it works well enough for my use.
by blenderob on 3/7/25, 12:25 PM
by tetris11 on 3/7/25, 12:58 PM
org --> markdown --> publish to hugo
all done with one save trigger