forked from mirrors/org-mode
ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag
* lisp/ox-html.el (org-html-template): Added the support for a CSS class name to the content tag which wraps the entire content. The CSS class name can be set via in buffer HTML_CONTENT_CLASS property or :html-content-class for org publish. TINYCHANGE
This commit is contained in:
parent
ea8f7610ce
commit
4efab7681e
|
@ -105,6 +105,10 @@ behavior.
|
||||||
|
|
||||||
By default ox-html now inlines webp images.
|
By default ox-html now inlines webp images.
|
||||||
|
|
||||||
|
*** New option ~org-html-content-class~
|
||||||
|
|
||||||
|
This is the CSS class name to use for the top level content wrapper.
|
||||||
|
|
||||||
** New features
|
** New features
|
||||||
*** =ob-python= improvements to =:return= header argument
|
*** =ob-python= improvements to =:return= header argument
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
:options-alist
|
:options-alist
|
||||||
'((:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
|
'((:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
|
||||||
(:html-container "HTML_CONTAINER" nil org-html-container-element)
|
(:html-container "HTML_CONTAINER" nil org-html-container-element)
|
||||||
|
(:html-content-class "HTML_CONTENT_CLASS" nil org-html-content-class)
|
||||||
(:description "DESCRIPTION" nil nil newline)
|
(:description "DESCRIPTION" nil nil newline)
|
||||||
(:keywords "KEYWORDS" nil nil space)
|
(:keywords "KEYWORDS" nil nil space)
|
||||||
(:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)
|
(:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)
|
||||||
|
@ -1080,6 +1081,16 @@ org-info.js for your website."
|
||||||
:package-version '(Org . "8.0")
|
:package-version '(Org . "8.0")
|
||||||
:type 'string)
|
:type 'string)
|
||||||
|
|
||||||
|
(defcustom org-html-content-class "content"
|
||||||
|
"CSS class name to use for the top level content wrapper.
|
||||||
|
Can be set with the in-buffer HTML_CONTENT_CLASS property or for
|
||||||
|
publishing, with :html-content-class."
|
||||||
|
:group 'org-export-html
|
||||||
|
:version "27.2"
|
||||||
|
:package-version '(Org . "9.5")
|
||||||
|
:type 'string)
|
||||||
|
|
||||||
|
|
||||||
(defcustom org-html-divs
|
(defcustom org-html-divs
|
||||||
'((preamble "div" "preamble")
|
'((preamble "div" "preamble")
|
||||||
(content "div" "content")
|
(content "div" "content")
|
||||||
|
@ -2091,7 +2102,10 @@ holding export options."
|
||||||
(org-html--build-pre/postamble 'preamble info)
|
(org-html--build-pre/postamble 'preamble info)
|
||||||
;; Document contents.
|
;; Document contents.
|
||||||
(let ((div (assq 'content (plist-get info :html-divs))))
|
(let ((div (assq 'content (plist-get info :html-divs))))
|
||||||
(format "<%s id=\"%s\">\n" (nth 1 div) (nth 2 div)))
|
(format "<%s id=\"%s\" class=\"%s\">\n"
|
||||||
|
(nth 1 div)
|
||||||
|
(nth 2 div)
|
||||||
|
(plist-get info :html-content-class)))
|
||||||
;; Document title.
|
;; Document title.
|
||||||
(when (plist-get info :with-title)
|
(when (plist-get info :with-title)
|
||||||
(let ((title (and (plist-get info :with-title)
|
(let ((title (and (plist-get info :with-title)
|
||||||
|
|
Loading…
Reference in New Issue