forked from mirrors/org-mode
ox-html: Exclude contents div and title from body-only export
* lisp/ox-html.el (org-html-inner-template): Remove contents div and title. (org-html-template): Add contents div and title.
This commit is contained in:
parent
f3ef3eb549
commit
51ab145e36
|
@ -1495,11 +1495,6 @@ INFO is a plist used as a communication channel."
|
||||||
CONTENTS is the transcoded contents string. INFO is a plist
|
CONTENTS is the transcoded contents string. INFO is a plist
|
||||||
holding export options."
|
holding export options."
|
||||||
(concat
|
(concat
|
||||||
(format "<div id=\"%s\">\n" (nth 1 org-html-divs))
|
|
||||||
;; Document title.
|
|
||||||
(let ((title (plist-get info :title)))
|
|
||||||
(when title
|
|
||||||
(format "<h1 class=\"title\">%s</h1>\n" (org-export-data title info))))
|
|
||||||
;; Table of contents.
|
;; Table of contents.
|
||||||
(let ((depth (plist-get info :with-toc)))
|
(let ((depth (plist-get info :with-toc)))
|
||||||
(when depth (org-html-toc depth info)))
|
(when depth (org-html-toc depth info)))
|
||||||
|
@ -1508,8 +1503,7 @@ holding export options."
|
||||||
;; Footnotes section.
|
;; Footnotes section.
|
||||||
(org-html-footnote-section info)
|
(org-html-footnote-section info)
|
||||||
;; Bibliography.
|
;; Bibliography.
|
||||||
(org-html-bibliography)
|
(org-html-bibliography)))
|
||||||
"\n</div>"))
|
|
||||||
|
|
||||||
(defun org-html-template (contents info)
|
(defun org-html-template (contents info)
|
||||||
"Return complete document string after HTML conversion.
|
"Return complete document string after HTML conversion.
|
||||||
|
@ -1548,7 +1542,13 @@ holding export options."
|
||||||
;; Preamble.
|
;; Preamble.
|
||||||
(org-html--build-preamble info)
|
(org-html--build-preamble info)
|
||||||
;; Document contents.
|
;; Document contents.
|
||||||
|
(format "<div id=\"%s\">\n" (nth 1 org-html-divs))
|
||||||
|
;; Document title.
|
||||||
|
(let ((title (plist-get info :title)))
|
||||||
|
(when title
|
||||||
|
(format "<h1 class=\"title\">%s</h1>\n" (org-export-data title info))))
|
||||||
contents
|
contents
|
||||||
|
"</div>\n"
|
||||||
;; Postamble.
|
;; Postamble.
|
||||||
(org-html--build-postamble info)
|
(org-html--build-postamble info)
|
||||||
;; Closing document.
|
;; Closing document.
|
||||||
|
|
Loading…
Reference in a new issue