~tomterl/tomsdiner.org

org-mode published static homepage sources.
Calculate end-date for copyright string in preamble
Removed stackoverflow reference
Link to https://writefreesoftware.org/

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 setup:

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 stored encrypted and accessed via `auth-source`.

(let* ((tdo (car (auth-source-search :host "tdo")))
       (remote-dir (concat (plist-get tdo :user) (plist-get tdo :port)))
       (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