From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Exporting html: any way to customize format h1 class="title"? Date: Sat, 26 Jul 2014 00:14:02 -0500 Message-ID: <87vbqkr9b9.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAuJA-0001le-01 for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 01:14:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAuJ4-0003uU-4a for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 01:14:11 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:36256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAuJ3-0003u5-Sx for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 01:14:06 -0400 Received: from archbook (unknown [50.172.132.15]) by mail.messagingengine.com (Postfix) with ESMTPA id B3A34C00005 for ; Sat, 26 Jul 2014 01:14:03 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode I greatly appreciate the new export backends (thanks Nicolas!). The filter functions are fantastic. One thing that I'm having difficulty finding, however, is some way to modify the content of the and <h1 class="title"> headings in the html. The function org-html-template hard-codes the formatting of the title: ,----[ox-html.el [lines 1864-1865] | (let ((title (plist-get info :title))) | (format "<h1 class=\"title\">%s</h1>\n" (org-export-data (or title "") info))) `---- AFAICT, there is no filter that would enable one to bypass the <h1> tag her or to give it different text than the <title> tag. The reason I ask is because I would like to omit the h1 header on the home page of my website or to give it different text than that given to <title>. Since my site will display a banner with my name at the top of all pages, I would prefer to avoid the redundancy of "Name" or a pedantic "Home" at the top the home page.[fn:1] On other pages, it would also be nice to be able to give different text to the <title> and <h1 class="title"> tags. For instance, many sites append the site name to the page title in the <title> tag. In the old export backends there were hooks that allowed some small modifications on the html after exporting it However, the two hooks of the new export backend hooks (org-export-before-processing-hook, org-export-before-parsing-hook) are called on copies of the org source. Are there any clever means that I've missed to modify the title tags? Thanks, Matt Footnotes: [fn:1] I know I can hide h1.title it with "display:none;" in the CSS, but I'd prefer not to do so, since it seems that hiding a major element can seem spammy to search engines. And now that I notice it, the org-mode site uses "display: none" in its css file to hide h1.title on all pages. Wouldn't it be easier to have an option in ox-html.el to omit the tag from the exported file?