forked from colonelpanic/dotfiles
		
	[Emacs] Use theme background color in org-export
This commit is contained in:
		| @@ -2982,6 +2982,26 @@ Intero seems to be causing hangs, so it has been disabled | ||||
|     ;; blame. | ||||
|     )) | ||||
| #+END_SRC | ||||
| **** Correct BG color for org-export | ||||
| #+BEGIN_SRC emacs-lisp | ||||
| (use-package org | ||||
|   :config | ||||
|   (progn | ||||
|     (defun imalison:org-inline-css-hook (exporter) | ||||
|       "Insert custom inline css to automatically set the | ||||
| background of code to whatever theme I'm using's background" | ||||
|       (when (eq exporter 'html) | ||||
|         (let* ((my-pre-bg (face-background 'default)) | ||||
|                (my-pre-fg (face-foreground 'default))) | ||||
|           (setq | ||||
|            org-html-head-extra | ||||
|            (concat | ||||
|             org-html-head-extra | ||||
|             (format "<style type=\"text/css\">\n pre.src {background-color: %s; color: %s;}</style>\n" | ||||
|                     my-pre-bg my-pre-fg)))))) | ||||
|  | ||||
|     (add-hook 'org-export-before-processing-hook 'imalison:org-inline-css-hook))) | ||||
| #+END_SRC | ||||
| **** org-projectile | ||||
|  #+BEGIN_SRC emacs-lisp | ||||
| (imalison:use-package org-projectile | ||||
|   | ||||
		Reference in New Issue
	
	Block a user