* [PATCH] ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag
@ 2021-02-08 22:46 Sameer Rahmani
2021-04-26 8:50 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Sameer Rahmani @ 2021-02-08 22:46 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Sameer Rahmani
* 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.
---
lisp/ox-html.el | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 11757bb35e8c..766897d0a032 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -113,6 +113,7 @@
:options-alist
'((:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
(: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)
(:keywords "KEYWORDS" nil nil space)
(:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)
@@ -1084,6 +1085,16 @@ org-info.js for your website."
:package-version '(Org . "8.0")
: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.1"
+ :package-version '(Org . "9.3.8")
+ :type 'string)
+
+
(defcustom org-html-divs
'((preamble "div" "preamble")
(content "div" "content")
@@ -2120,7 +2131,10 @@ holding export options."
(org-html--build-pre/postamble 'preamble info)
;; Document contents.
(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.
(when (plist-get info :with-title)
(let ((title (and (plist-get info :with-title)
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag
2021-02-08 22:46 [PATCH] ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag Sameer Rahmani
@ 2021-04-26 8:50 ` Bastien
2021-04-27 8:26 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2021-04-26 8:50 UTC (permalink / raw)
To: Sameer Rahmani; +Cc: emacs-orgmode
Applied as 4efab7681, thanks.
I added "TINYCHANGE" at the bottom of your commit message to signal
this is small change done by someone who has not (yet) assigned his
copyright to the FSF.
Sameer Rahmani <lxsameer@gnu.org> writes:
> * 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag
2021-04-26 8:50 ` Bastien
@ 2021-04-27 8:26 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2021-04-27 8:26 UTC (permalink / raw)
To: Sameer Rahmani; +Cc: emacs-orgmode
Bastien <bzg@gnu.org> writes:
> I added "TINYCHANGE" at the bottom of your commit message to signal
> this is small change done by someone who has not (yet) assigned his
> copyright to the FSF.
Er, sorry Sameer, my mistake, you are actually listed on
https://orgmode.org/worg/org-contribute.html as a copyright
contributor.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-27 8:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-08 22:46 [PATCH] ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag Sameer Rahmani
2021-04-26 8:50 ` Bastien
2021-04-27 8:26 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).