(setq user-full-name "Mez") (setq org-export-with-toc nil) (setq org-export-global-macros '(("theboy" . "[[https://kes.praze.net/@adt][@adt]]") ("dwuser" . "[[https://$1.dreamwidth.org][~$1]]") ("dwcomm" . "[[https://$1.dreamwidth.org][/$1]]"))) (setq org-html-doctype "html5") (setq org-html-head-include-default-style nil) (setq org-html-head-include-scripts nil) (setq org-html-use-infojs nil) (setq org-html-divs '((preamble "nav" "nav") (content "main" "content") (postamble "footer" "postamble"))) (setq org-html-preamble "\n\n") (setq org-html-postamble "") (setq thetitle (cadar (org-collect-keywords '("TITLE")))) (setq pageurl (replace-regexp-in-string "-" "" (file-name-base))) (setq thedesc (cadar (org-collect-keywords '("OGDESC")))) (setq thecategory (cadar (org-collect-keywords '("CATEGORY")))) (setq tumblrop "") (setq tumblrop (cadar (org-collect-keywords '("OP")))) (setq havecomments (if (string-match (cadar (org-collect-keywords '("COMMENTS"))) "t") t nil)) (setq thedate (concat (substring (file-name-base) 0 4) (substring (file-name-base) 5 7) (substring (file-name-base) 8 10))) (if (> (string-to-number thedate) 20240700) (setq bridged t) (setq bridged nil)) (setq org-html-head (concat "\n\n\n\n\n\n\n\n\n\n\n\n\n\n")) (defun org-html-template (contents info) "Return complete document string after HTML conversion. CONTENTS is the transcoded contents string. INFO is a plist holding export options." (concat (when (and (not (org-html-html5-p info)) (org-html-xhtml-p info)) (let* ((xml-declaration (plist-get info :html-xml-declaration)) (decl (or (and (stringp xml-declaration) xml-declaration) (cdr (assoc (plist-get info :html-extension) xml-declaration)) (cdr (assoc "html" xml-declaration)) ""))) (when (not (or (not decl) (string= "" decl))) (format "%s\n" (format decl (or (and org-html-coding-system ;; FIXME: Use Emacs 22 style here, see `coding-system-get'. (coding-system-get org-html-coding-system 'mime-charset)) "iso-8859-1")))))) (org-html-doctype info) "\n" (concat "\n") "\n" (org-html--build-meta-info info) (org-html--build-head info) (org-html--build-mathjax-config info) "\n" "\n" (let ((link-up (org-trim (plist-get info :html-link-up))) (link-home (org-trim (plist-get info :html-link-home)))) (unless (and (string= link-up "") (string= link-home "")) (format (plist-get info :html-home/up-format) (or link-up link-home) (or link-home link-up)))) ;; Preamble. (org-html--build-pre/postamble 'preamble info) "
\n" ;; Document contents. (let ((div (assq 'content (plist-get info :html-divs)))) (format "<%s id=\"%s\" class=\"%s h-entry\">\n" (nth 1 div) (nth 2 div) (plist-get info :html-content-class))) "
\n" ;; Document title. (if (string-match "tumblr" thecategory) (concat "

" tumblrop " on tumblr said: “" thetitle "”

\n") (concat "

" thetitle "

\n")) (when (string-match "tumblr" thecategory) (concat "
\n
\n

tre.praze.net

\n

Reblogged

\n
\n
\n
\n
\n

" tumblrop "

\n")) "

\n" (when (string-match "tumblr" thecategory) (concat "
\n
\n

" thetitle "

\n")) "
\n" (unless (string-match "tumblr" thecategory) (concat "

If the formatting of this post seems odd or incomplete, try viewing the original on my site.

")) contents "
\n
\n
" (when bridged (concat "

You can find this post on the fediverse by searching for https://fed.brid.gy/r/https://tre.praze.net/notes/" thedate "/ in your fediverse client.

")) (if havecomments "
\n

Comments

\n\n

You can comment on this post if you like. Comments will be posted below after moderation. All comments are anonymous and email addresses, if provided, will not be published.

\n
\n
\nOld emoticons I stole from the wayback machine\n
\n
:animesweat:
\n
:aww:
\n
:biggrin:
\n
:blankstare:
\n
:bleh:
\n
:boogie:
\n
:bounce:
\n
:bow:
\n
:bump:
\n
:cd:
\n
:clap:
\n
:confused:
\n
:cool:
\n
:dance:
\n
:dead:
\n
:eager:
\n
:eek:
\n
:giggle:
\n
:headbang:
\n
:la:
\n
:lmao:
\n
:meow:
\n
:ninja:
\n
:nod:
\n
:ohnoes:
\n
:razz:
\n
:rofl:
\n
:sad:
\n
:shrug:
\n
:smile:
\n
:tombstone:
\n
:tongue:
\n
:typing:
\n
:wave:
\n
:wink:
\n
:winkrazz:
\n
:woot:
\n
:worry:
\n
:worship:
\n
:xd:
\n
\n
\n\n\n
\n\n
\n
\n\n
\n\n
\n
\n") "\n\n
\n" (format "\n" (nth 1 (assq 'content (plist-get info :html-divs)))) ;; Postamble. (org-html--build-pre/postamble 'postamble info) "
\n" "\n" ;; Possibly use the Klipse library live code blocks. (when (plist-get info :html-klipsify-src) (concat "")) (if havecomments "\n") ;; Closing document. "\n")) (defun my-html-filter-nobreaks (text backend info) "Keep non-breaking spaces in HTML org export" (when (org-export-derived-backend-p backend 'html) (replace-regexp-in-string " " " " text))) (if (string-equal system-type "android") (setq org-export-filter-plain-text-functions 'my-html-filter-nobreaks) (add-to-list 'org-export-filter-plain-text-functions 'my-html-filter-nobreaks)) (defun my-org-export-add-target-blank-to-http-links (text backend info) "Add target=\"_blank\" to external links." (when (and (org-export-derived-backend-p backend 'html) (string-match "href=\"http[^\"]+" text) (not (string-match "target=\"" text))) (string-match "