Update build script
This commit is contained in:
parent
deefa0c163
commit
0c1c736bae
2 changed files with 160 additions and 3 deletions
|
@ -1,7 +1,12 @@
|
|||
export:
|
||||
all:
|
||||
|
||||
clean:
|
||||
rm -rf _publish
|
||||
|
||||
export: clean
|
||||
emacs -L ~/.emacs.d/vendor-lisp/org/lisp \
|
||||
-batch -l project.el \
|
||||
-L ~/.emacs.d/vendor-lisp/org/contrib/lisp -batch -l project.el \
|
||||
-f org-publish-all
|
||||
|
||||
publish:
|
||||
publish: export
|
||||
rsync -avuz --exclude=*~ _publish/ ryuslash.org:public_html/orgweb
|
||||
|
|
152
site/project.el
Normal file
152
site/project.el
Normal file
|
@ -0,0 +1,152 @@
|
|||
(require 'org-publish)
|
||||
;; (require 'ox-html)
|
||||
|
||||
;; (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 "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"%s\" xml:lang=\"%s\">\n"
|
||||
;; (plist-get info :language) (plist-get info :language))
|
||||
;; "<head>\n"
|
||||
;; (org-html--build-meta-info info)
|
||||
;; (org-html--build-head info)
|
||||
;; (org-html--build-mathjax-config info)
|
||||
;; "</head>\n"
|
||||
;; "<body>\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.
|
||||
;; "<div class=\"navbar\">\n<div class=\"navbar-inner\">\n"
|
||||
;; (let ((title (plist-get info :title)))
|
||||
;; (format "<a class=\"brand\" href=\"#\">%s</a>\n" (org-export-data (or title "") info)))
|
||||
;; "</div>\n</div>\n"
|
||||
;; contents
|
||||
;; (format "")
|
||||
;; (format "</%s>\n"
|
||||
;; (nth 1 (assq 'content org-html-divs)))
|
||||
;; ;; Postamble.
|
||||
;; "<div class=\"container\">\n"
|
||||
;; (org-html--build-pre/postamble 'postamble info)
|
||||
;; "</div>\n"
|
||||
;; ;; Closing document.
|
||||
;; "</body>\n</html>"))
|
||||
|
||||
;; (defun org-html--tags (tags)
|
||||
;; "Format TAGS into HTML."
|
||||
;; (when tags
|
||||
;; (format "<small class=\"tag pull-right\">%s</small>"
|
||||
;; (mapconcat
|
||||
;; (lambda (tag)
|
||||
;; (format "<span class=\"%s\">%s</span>"
|
||||
;; (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
|
||||
;; "<div class=\"row\">\n"
|
||||
;; "<div class=\"span3\">\n"
|
||||
;; ;; Table of contents.
|
||||
;; (when depth (org-html-toc depth info))
|
||||
;; "</div>\n"
|
||||
;; "<div class=\"span9\">\n"))
|
||||
;; ;; Document contents.
|
||||
;; contents
|
||||
;; (when depth
|
||||
;; "</div>\n</div>")
|
||||
;; ;; 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<ul class=\"nav nav-tabs nav-stacked\">\n<li>")
|
||||
;; ((< cnt 0) "</li>\n</ul>\n")))
|
||||
;; (if (> cnt 0) "\n<ul class=\"nav nav-tabs nav-stacked\">\n<li class=\"nav-header\">Table of Contents</li>\n<li>" "</li>\n<li>")))
|
||||
;; headline)))
|
||||
;; toc-entries "")
|
||||
;; (org-html--make-string (- prev-level start-level) "</li>\n</ul>\n"))))
|
||||
|
||||
(setq org-html-head-include-scripts nil
|
||||
org-html-validation-link nil
|
||||
org-publish-use-timestamps-flag nil
|
||||
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 t
|
||||
:base-extension "org"
|
||||
:publishing-function org-html-publish-to-html
|
||||
:section-numbers nil
|
||||
:table-of-contents 1
|
||||
:html-doctype "<!DOCTYPE html>"
|
||||
:html-head "<link href=\"http://ryuslash.org/org.css\" type=\"text/css\" rel=\"stylesheet\" />"
|
||||
:html-link-home "http://ryuslash.org")))
|
Loading…
Reference in a new issue