feat(emacs): Customise default CSS for HTML exports

This commit is contained in:
Madeleine Sydney
2025-02-21 21:14:41 -07:00
parent 9cf1e48252
commit 0c3e64b52e

View File

@@ -255,6 +255,32 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
(org-agenda-entry-types '(:deadline)) (org-agenda-entry-types '(:deadline))
(org-agenda-overriding-header "Upcoming deadlines")))))))) (org-agenda-overriding-header "Upcoming deadlines"))))))))
(defvar syd-org-default-css "
<style>
html
{ height: 100%;
}
body
{ height: 100%
; padding: 0 10px
; line-height: 1.6
; font-size: 18px
; margin: 40px auto
; max-width: 650px
; color: #444
}
h1, h2, h3
{ line-height: 1.2
}
pre
{ line-height: normal
}
</style>"
"A default style for Org HTML exports.")
(use-package org (use-package org
:defer-incrementally :defer-incrementally
calendar find-func format-spec org-macs org-compat org-faces org-entities calendar find-func format-spec org-macs org-compat org-faces org-entities
@@ -305,6 +331,8 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
(org-enforce-todo-dependencies t) (org-enforce-todo-dependencies t)
(org-image-actual-width nil) (org-image-actual-width nil)
(org-imenu-depth 6) (org-imenu-depth 6)
;; Include some sane default CSS declarations when exporting to HTML.
(org-html-head syd-org-default-css)
;; Don't right-align tags. ;; Don't right-align tags.
(org-tags-column 0) (org-tags-column 0)
(org-priority-faces '((?A . error) (org-priority-faces '((?A . error)