Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSS style override ability #31

Merged
merged 3 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ EXTENSIONS
(lambda (request)
(let ((file (buffer-file-name (current-buffer))))
(vc-checkin (list file)
(vc-backend file) nil "edit through org-ehtml"))))
(vc-backend file) "edit through org-ehtml"))))

Authentication

Expand Down Expand Up @@ -98,3 +98,9 @@ EXTENSIONS

[5] http://localhost:8888/agenda/tags/work
[6] http://localhost:8888/agenda/tags/todo/work

STYLE

Override CSS by making a file in your home directory called
~/.ox-ehtml-override.css and enter in your CSS in there. A
good theme is: https://github.com/oxalorg/sakura/
5 changes: 4 additions & 1 deletion src/ox-ehtml.el
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
(defvar org-ehtml-style
(concat
"<style type=\"text/css\">\n<!--/*--><![CDATA[/*><!--*/\n"
(file-contents (expand-file-name "ox-ehtml.css" org-ehtml-base))
(file-contents (if (file-exists-p (expand-file-name "~/.ox-ehtml-override.css"))
(expand-file-name "~/.ox-ehtml-override.css")
(expand-file-name "ox-ehtml.css" org-ehtml-base)
))
"/*]]>*/-->\n</style>"))

(defvar org-ehtml-jquery
Expand Down