~tomterl/tomsdiner.org

org-mode published static homepage sources.
05c7ba6d — Tom Regner 30 days ago
Link to the generated tags page
49a1d0bc — Tom Regner 30 days ago
Removed twitter mention
a22100f2 — Tom Regner 30 days ago
WIP: blog tags

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~tomterl/tomsdiner.org
read/write
git@git.sr.ht:~tomterl/tomsdiner.org

You can also use your local clone with git send-email.

Statically generated web-presence

This is my homepage. It is written as a couple of org-mode files, and exported/generated using org-publish. The configuration used for that is part of my emacs.d:

The project is split in two: The static files (css, images, …) tdo-static, and the content tdo-contenttdo is the target to export both at once.

The top-navigation and footer are so simple, they are configured as html-preamble resp. html-postamble; the css-stylesheet header is configured as html-head link-element.

The remote setup is externally in my .netrc file.

(let* ((tdo (netrc-machine (netrc-parse "~/.netrc.gpg") "tdo"))
             (remote-dir (concat (netrc-get tdo "login") (netrc-get tdo "account")))
             (remote-static-dir (concat remote-dir "static/")))
        (setq org-publish-project-alist
              `(("tdo"
                 :components ("tdo-content" "tdo-static"))
                ("tdo-content"
                 :base-directory "~/Projekte/tomsdiner.org/"
                 :base-extension "org"
                 :publishing-directory ,remote-dir
                 :recursive t
                 :publishing-function org-html-publish-to-html
                 :export-with-tags nil
                 :headline-levels 4             ; Just the default for this project.
                 :with-toc nil
                 :section-numbers nil
                 :with-sub-superscript nil
                 :with-todo-keywords nil
                 :with-author nil
                 :with-creator nil
                 :with-title nil
                 :html-preamble "<nav>
                               <a href=\"/index.html\" class=\"home\"><b>Me+Myself+I</b></a>
                             <a href=\"/myself/index.html\">myself</a>
                             <a href=\"/blog/index.html\">posts</a>
                             <a href=\"https:///sr.ht/~tomterl\">projects</a>
                           </nav>
                           <hr/>"
                 :html-postamble "<footer>
                              <a href=\"/imprint.html\">imprint</a>&nbsp;|&nbsp;(c) 2021 Thomas Regner - <a href=\"https://creativecommons.org/licenses/by-sa/4.0/\">CC-BY-SA-4.0</a>&nbsp;|&nbsp;using <a href=\"https://simplecss.org/\">simplecss</a> by Kev Quirk
                            </footer><hr/>"
                 :html-head "<link rel=\"stylesheet\"
                           href=\"/static/css/style.min.css\" type=\"text/css\"/><title>tomsdiner.org</title>"
                 :html-head-include-default-style nil
                 :html-toplevel-hlevel 2
                 :with-timestamp t
                 :exclude-tags ("noexport" "todo")
                 :auto-preamble t)
                ("tdo-static"
                 :base-directory "~/Projekte/tomsdiner.org/static/"
                 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|otf"
                 :publishing-directory ,remote-static-dir
                 :recursive t
                 :publishing-function org-publish-attachment)
                 ("tdo-favicon"
                 :base-directory "~/Projekte/tomsdiner.org/"
                 :base-extension "ico"
                 :publishing-directory ,remote-dir
                 :recursive nil
                 :publishing-function org-publish-attachment))))                 

Posts

Small articles. The link-list is generated as raw-result of a babel shell-block:

: #+BEGIN_SRC sh :exports results :results output raw
: for i in $(ls -t ./post_*.org); do
:    echo "- [[$(sed 's/\.org/.html/' <<< ${i})][$(grep -Po "(?<=^\* )(.+)" ${i})]]"
: done
: #+END_SRC