[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to omit h1 title heading in HTML export?
From: |
Rasmus |
Subject: |
Re: [O] How to omit h1 title heading in HTML export? |
Date: |
Tue, 04 Jun 2013 19:24:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
"*" <address@hidden> writes:
> Hey Basile
> Thanks for your reply!
>
> Yes, the suggestion helps :-)
> A blank TITLE option seems to produce some empty tags like so:
> <h1 class="title"></h1>
>
> And maybe there are also some jquery fixes, for instance...
> $("#content h1:first-child").hide();
>
> Sometimes tricks are fun,
> but I guess one of my questions was: Do all documents generated by
> HTML export contain the <h1 class="title">blabla</h1> markup?
Yes seems like it. check ox-html.el and org-html--build-meta-info.
If you are very unhappy with blank title solution proposed by
Bastien you could use a filter. Here's a filter I use for headlines;
you can easily adapt it to your case:
(defun rasmus/org-html-ignore-title-if-present (string backend info)
"Strip title if it's already there for html."
(when (and (org-export-derived-backend-p backend 'html)
(string-match "h1 class=\"mytitle\"" string))
(replace-regexp-in-string "<h1 class=\"title\">.*?</h1>" "" string)))
(add-to-list 'org-export-filter-final-output-functions
'rasmus/org-html-ignore-title-if-present)
--
I hear there's rumors on the, uh, Internets. . .