[Emacs] Get page generation faces from faces.css
This commit is contained in:
parent
40902a6090
commit
4b77e33273
@ -1,5 +1,3 @@
|
|||||||
<style type="text/css">
|
|
||||||
<!--
|
|
||||||
pre.src {
|
pre.src {
|
||||||
background-color: #fdf6e3;
|
background-color: #fdf6e3;
|
||||||
color: #657b83;
|
color: #657b83;
|
||||||
@ -3400,5 +3398,3 @@
|
|||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
-->
|
|
||||||
</style>
|
|
||||||
|
@ -29,4 +29,20 @@
|
|||||||
(setq org-html-htmlize-output-type 'css)
|
(setq org-html-htmlize-output-type 'css)
|
||||||
(setq org-confirm-babel-evaluate nil)
|
(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 "<style type=\"text/css\">\n%s</style>\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))
|
(message (export-target readme-src))
|
||||||
|
Loading…
Reference in New Issue
Block a user