From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: How to omit h1 title heading in HTML export?
Date: Tue, 04 Jun 2013 19:24:06 +0200 [thread overview]
Message-ID: <87ppw13i2x.fsf@pank.eu> (raw)
In-Reply-To: CAEZhbHgzFMRykPn-xSAiVow4X3c5Qh9jK-H+H8kWgKyJkdS27w@mail.gmail.com
"*" <viki.veeks@gmail.com> 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. . .
next prev parent reply other threads:[~2013-06-04 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 17:20 How to omit h1 title heading in HTML export? *
2013-06-04 8:12 ` flammable project
2013-06-04 17:16 ` *
2013-06-04 17:24 ` Rasmus [this message]
2013-06-05 18:48 ` *
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppw13i2x.fsf@pank.eu \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).