We insert a CSS file in to the files I org-export
.
defun cce/org-inline-css-hook (exporter)
("Insert custom inline css"
when (eq exporter 'html)
(let* ((dir (ignore-errors (file-name-directory (buffer-file-name))))
("style.css"))
(path (concat dir or (null dir) (null (file-exists-p path))))
(homestyle (if homestyle "~/org/style.css" path))) ;; <- set your own style file path
(final (setq org-html-head-include-default-style nil)
(setq org-html-head (concat
("<style type=\"text/css\">\n"
"<!--/*--><![CDATA[/*><!--*/\n"
(with-temp-buffer
(insert-file-contents final)
(buffer-string))"/*]]>*/-->\n"
"</style>\n")))))
'org-export-before-processing-hook 'cce/org-inline-css-hook) (add-hook