組織ファイルを html にエクスポートすると、1 つの組織ファイルが 1 つの html ファイルに変換されるように見えます。特定の見出しを個別のファイルとしてエクスポートして、メイン ページと多数のサブページをすべて 1 つの組織ファイルから作成することはできますか? たとえば、組織ガイドは論理的に単一のファイルに配置できるように見えます。
1855 次
3 に答える
0
(defun my-org-export-each-level-1-headline-to-html (&optional scope)
(interactive)
(org-map-entries
(lambda ()
(let* ((title (car (last (org-get-outline-path t))))
(dir (file-name-directory buffer-file-name))
(filename (concat dir title ".html")))
(org-narrow-to-subtree)
(org-html-export-as-html)
(write-file filename)
(kill-current-buffer)
(widen)))
"LEVEL=1" scope))
見出しレベル=1ごとにhtmlファイルを生成します。https://emacs.stackexchange.com/questions/54937/split-every-single-org-headline-in-a-org-file-to-separate-md-org-filesに基づく
于 2020-12-23T18:13:03.247 に答える