Hi Henry, Henry Hirsch <he...@w3-net.de> writes:
> So how can org mode support wrapping sections in html? > Especially for more complex cases where a section or > multiple sections will be wrapped in multiple divs. You can do this with an export filter or filters. See the "Advanced Configuration" section in the "Exporting" chapter of the manual. Here is a simple example to get you started: #+BEGIN_SRC elisp (defun my-html-headline-wrap-filter (text backend info) "Wrap headlines in div.jumbotron during export." (when (org-export-derived-backend-p backend 'html) (concat "<div class=\"jumbotron\">" text "</div>"))) (add-to-list 'org-export-filter-headline-functions 'my-html-headline-wrap-filter) #+END_SRC As written, this will wrap *all* sections (including their headline) in divs with the jumbotron class during HTML export. You probably want to do this for just some headlines, in just some documents. So, you'll need to add a test in my-html-headline-wrap-filter so that it only wraps the relevant headlines, and leaves others unchanged. Perhaps you can do this based on the title of the headline, or the presence of some tag or property. If you need help with this, just ask! Best, Richard