From 4b77e33273b0e9572901dcc58779e0f28f48defd Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 28 Dec 2016 16:54:10 -0800 Subject: [PATCH] [Emacs] Get page generation faces from faces.css --- bin/faces.css | 6802 +++++++++++++++++++++--------------------- bin/generate-html.el | 16 + 2 files changed, 3415 insertions(+), 3403 deletions(-) diff --git a/bin/faces.css b/bin/faces.css index 38d716de..01f6631d 100644 --- a/bin/faces.css +++ b/bin/faces.css @@ -1,3404 +1,3400 @@ - +a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; +} +a:hover { + text-decoration: underline; +} diff --git a/bin/generate-html.el b/bin/generate-html.el index c2c49ba0..eae66b93 100755 --- a/bin/generate-html.el +++ b/bin/generate-html.el @@ -29,4 +29,20 @@ (setq org-html-htmlize-output-type 'css) (setq org-confirm-babel-evaluate nil) +(defun add-faces-css (exporter) + "Insert custom inline css to automatically set the +background of code to whatever theme I'm using's background" + (setq + org-html-head-extra + (concat + org-html-head-extra + (format "\n" + (with-temp-buffer + (insert-file-contents + (concat (file-name-directory load-file-name) "faces.css")) + (buffer-string)))))) + +(add-hook 'org-export-before-processing-hook 'add-faces-css) +(remove-hook 'org-export-before-processing-hook 'imalison:org-inline-css-hook) + (message (export-target readme-src))