(require 'ox-publish) (require 'ox-rss) ;; (require 'ox-html) (load "common.el") ;; (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 ;; (format ;; (or (and (stringp org-html-xml-declaration) ;; org-html-xml-declaration) ;; (cdr (assoc (plist-get info :html-extension) ;; org-html-xml-declaration)) ;; (cdr (assoc "html" org-html-xml-declaration)) ;; "") ;; (or (and org-html-coding-system ;; (fboundp 'coding-system-get) ;; (coding-system-get org-html-coding-system 'mime-charset)) ;; "iso-8859-1")) ;; "\n" ;; (plist-get info :html-doctype) ;; "\n" ;; (format "\n" ;; (plist-get info :language) (plist-get info :language)) ;; "\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-up "")) ;; (format org-html-home/up-format ;; (or link-up link-home) ;; (or link-home link-up)))) ;; ;; Preamble. ;; (org-html--build-pre/postamble 'preamble info) ;; ;; Document contents. ;; (format "<%s class=\"%s\">\n" ;; (nth 1 (assq 'content org-html-divs)) ;; (nth 2 (assq 'content org-html-divs))) ;; ;; Document title. ;; "
\n
\n" ;; (let ((title (plist-get info :title))) ;; (format "%s\n" (org-export-data (or title "") info))) ;; "
\n
\n" ;; contents ;; (format "") ;; (format "\n" ;; (nth 1 (assq 'content org-html-divs))) ;; ;; Postamble. ;; "
\n" ;; (org-html--build-pre/postamble 'postamble info) ;; "
\n" ;; ;; Closing document. ;; "\n")) ;; (defun org-html--tags (tags) ;; "Format TAGS into HTML." ;; (when tags ;; (format "%s" ;; (mapconcat ;; (lambda (tag) ;; (format "%s" ;; (concat org-html-tag-class-prefix ;; (org-html-fix-class-name tag)) ;; tag)) ;; tags " ")))) ;; (defun org-html-inner-template (contents info) ;; "Return body of document string after HTML conversion. ;; CONTENTS is the transcoded contents string. INFO is a plist ;; holding export options." ;; (let ((depth (plist-get info :with-toc))) ;; (concat ;; (when depth ;; (concat ;; "
\n" ;; "
\n" ;; ;; Table of contents. ;; (when depth (org-html-toc depth info)) ;; "
\n" ;; "
\n")) ;; ;; Document contents. ;; contents ;; (when depth ;; "
\n
") ;; ;; Footnotes section. ;; (org-html-footnote-section info) ;; ;; Bibliography. ;; (org-html-bibliography)))) ;; (defun org-html-toc (depth info) ;; "Build a table of contents. ;; DEPTH is an integer specifying the depth of the table. INFO is a ;; plist used as a communication channel. Return the table of ;; contents as a string, or nil if it is empty." ;; (let ((toc-entries ;; (mapcar (lambda (headline) ;; (cons (org-html--format-toc-headline headline info) ;; (org-export-get-relative-level headline info))) ;; (org-export-collect-headlines info depth)))) ;; (when toc-entries (org-html--toc-text toc-entries)))) ;; (defun org-html--toc-text (toc-entries) ;; "Return innards of a table of contents, as a string. ;; TOC-ENTRIES is an alist where key is an entry title, as a string, ;; and value is its relative level, as an integer." ;; (let* ((prev-level (1- (cdar toc-entries))) ;; (start-level prev-level)) ;; (concat ;; (mapconcat ;; (lambda (entry) ;; (let ((headline (car entry)) ;; (level (cdr entry))) ;; (concat ;; (let* ((cnt (- level prev-level)) ;; (times (if (> cnt 0) (1- cnt) (- cnt))) ;; rtn) ;; (setq prev-level level) ;; (concat ;; (org-html--make-string ;; times (cond ((> cnt 0) "\n\n"))) ;; (if (> cnt 0) "\n\n")))) (setq org-publish-use-timestamps-flag nil org-rss-extension "rss" org-publish-project-alist '(("oni-files" :base-directory "./" :publishing-directory "_publish/" :recursive nil :base-extension "css\\|png" :publishing-function org-publish-attachment) ("org" :base-directory "./" :publishing-directory "_publish/" :recursive nil :base-extension "org" :publishing-function org-html-publish-to-html :section-numbers nil :table-of-contents 1 :html-doctype "" :html-head "\n" :html-link-home "https://ryuslash.org") ("projects" :base-directory "./projects/" :publishing-directory "_publish/projects/" :recursive t :base-extension "org" :publishing-function org-html-publish-to-html :section-numbers nil :table-of-contents 1 :html-doctype "" :html-head "\n" :html-link-home "https://ryuslash.org")))