From e8027cbeac9e4fc0efe5a0b661bcc2e2a89dab35 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 25 Nov 2020 15:47:30 +0000 Subject: Fix documentation for docs website --- docs/publish.el | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 86 insertions(+), 11 deletions(-) (limited to 'docs/publish.el') diff --git a/docs/publish.el b/docs/publish.el index e7a27d7..df7235d 100644 --- a/docs/publish.el +++ b/docs/publish.el @@ -1,14 +1,89 @@ ;; Publishing projects, this one is for the zettelkasten +(require 'package) +(package-initialize) +(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-refresh-contents) +(package-install 'org-plus-contrib) +(package-install 'htmlize) + (require 'org) +(require 'ox-publish) + +(defvar vericert/header "") +(defvar vericert/site-attachments nil) +(defvar vericert/base "") + +(setq vericert/base "/vericert") + +(setq vericert/header (concat "
+
+ + +

Vericert is the first formally verified high-level synthesis tool.

+
+
+
")) + +(setq vericert/site-attachments + (regexp-opt '("jpg" "jpeg" "gif" "png" "svg" + "ico" "cur" "css" "js" "woff" "html" "pdf"))) + +(setq user-full-name nil) + +(setq org-export-with-smart-quotes t + org-export-with-section-numbers t + org-export-with-toc t) + +(setq org-html-divs '((preamble "header" "header") + (content "main" "content") + (postamble "footer" "postamble")) + org-html-container-element "section" + org-html-metadata-timestamp-format "%Y-%m-%d" + org-html-checkbox-type 'html + org-html-html5-fancy t + org-html-validation-link nil + org-html-doctype "html5" + org-html-coding-system 'utf-8-unix + org-html-head-include-default-style nil + org-html-head-include-scripts nil) + (setq org-publish-project-alist - '(("orgfiles" - :base-directory "./" - :base-extension "org" - :publishing-directory "./html/" - :publishing-function org-html-publish-to-html) - ("assets" - :base-directory "./css/" - :base-extension "css" - :publishing-directory "./html/css/" - :publishing-function org-publish-attachment) - ("documentation" :components ("orgfiles" "assets")))) + (list + (list "vericert-org" + :base-directory "./" + :base-extension "org" + :exclude (regexp-opt '("README" "draft")) + :html-head-extra + (concat " + +") + :html-preamble t + :html-preamble-format (list (list "en" vericert/header)) + :html-postamble t + :html-postamble-format '(("en" "")) + :publishing-directory "./html" + :publishing-function 'org-html-publish-to-html + :recursive t) + (list "vericert-assets" + :base-directory "." + :base-extension vericert/site-attachments + :include '(".nojekyll") + :exclude "html/" + :publishing-directory "./html" + :publishing-function 'org-publish-attachment + :recursive t) + (list "vericert" :components '("vericert-org" "vericert-assets")))) + +(defun publish-vericert-docs () + "Publish Vericert documentation." + (interactive) + (org-publish "vericert" t)) -- cgit