* Publish HTML Without Title
@ 2011-11-26 2:23 Rasmus
2011-11-26 7:40 ` Nick Dokos
2011-11-27 3:31 ` Nick Dokos
0 siblings, 2 replies; 8+ messages in thread
From: Rasmus @ 2011-11-26 2:23 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I publish my website with Org. have defined my title in
org-publish-project-alist under the :html-preamble.
However, it seems that recent Orgs have become 'smart' and now I don't
know how to disable the publishing of title and I have the title printed
twice. As I recall this was not an issue before.
It seems to stem from org-html. el around 1358:
#+begin_src emacs-lisp
;; begin wrap around body
(insert (format "\n<div id=\"%s\">"
;; FIXME org-export-html-content-div is obsolete since 7.7
(or org-export-html-content-div
(nth 1 org-export-html-divs)))
;; FIXME this should go in the preamble but is here so
;; that org-infojs can still find it
"\n<h1 class=\"title\">" title "</h1>\n"))
#+end_src
Are there any known solutions to this at the moment?
Thanks,
Rasmus
--
Sent from my Emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-11-26 2:23 Publish HTML Without Title Rasmus
@ 2011-11-26 7:40 ` Nick Dokos
2011-11-26 13:40 ` Rasmus Pank Roulund
2011-11-27 3:31 ` Nick Dokos
1 sibling, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-11-26 7:40 UTC (permalink / raw)
To: Rasmus; +Cc: nicholas.dokos, emacs-orgmode
Rasmus <rasmus@gmx.us> wrote:
> Hi,
>
> I publish my website with Org. have defined my title in
> org-publish-project-alist under the :html-preamble.
>
> However, it seems that recent Orgs have become 'smart' and now I don't
> know how to disable the publishing of title and I have the title printed
> twice. As I recall this was not an issue before.
>
> It seems to stem from org-html. el around 1358:
>
> #+begin_src emacs-lisp
> ;; begin wrap around body
> (insert (format "\n<div id=\"%s\">"
> ;; FIXME org-export-html-content-div is obsolete since 7.7
> (or org-export-html-content-div
> (nth 1 org-export-html-divs)))
> ;; FIXME this should go in the preamble but is here so
> ;; that org-infojs can still find it
> "\n<h1 class=\"title\">" title "</h1>\n"))
> #+end_src
>
> Are there any known solutions to this at the moment?
>
I spent 10 minutes trying to recreate the problem, and decided that I
have no idea what you are talking about.
So in my role as the official and perpetual nag on this list: can you
please post your org-publish-project-list -or at least the relevant subset-
and (unless, as I suspect, the org file is completely trivial) an ECM
exhibiting the problem?
Thanks,
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-11-26 7:40 ` Nick Dokos
@ 2011-11-26 13:40 ` Rasmus Pank Roulund
2011-12-11 16:23 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Rasmus Pank Roulund @ 2011-11-26 13:40 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> Rasmus <rasmus@gmx.us> wrote:
>
>> Hi,
>>
>> I publish my website with Org. have defined my title in
>> org-publish-project-alist under the :html-preamble.
>>
>> However, it seems that recent Orgs have become 'smart' and now I don't
>> know how to disable the publishing of title and I have the title printed
>> twice. As I recall this was not an issue before.
>>
>> It seems to stem from org-html. el around 1358:
>>
>> #+begin_src emacs-lisp
>> ;; begin wrap around body
>> (insert (format "\n<div id=\"%s\">"
>> ;; FIXME org-export-html-content-div is obsolete since 7.7
>> (or org-export-html-content-div
>> (nth 1 org-export-html-divs)))
>> ;; FIXME this should go in the preamble but is here so
>> ;; that org-infojs can still find it
>> "\n<h1 class=\"title\">" title "</h1>\n"))
>> #+end_src
>>
>> Are there any known solutions to this at the moment?
>>
>
> I spent 10 minutes trying to recreate the problem, and decided that I
> have no idea what you are talking about.
>
> So in my role as the official and perpetual nag on this list: can you
> please post your org-publish-project-list -or at least the relevant
> subset-
> and (unless, as I suspect, the org file is completely trivial) an ECM
> exhibiting the problem?
In my publish file I have (Warning: 'destructive' example that setq
rather than add-to-list).
#+begin_src emacs-lisp
(setq org-publish-project-alist
'(
("test"
:base-directory "~/test"
:publishing-directory "~/test"
:html-preamble "
<div id=\"top\">
<h1 class=\"title\">%t</h1>
<div id=\"menu\">
<a href=\"index.html\" >Home</a> |
<a href=\"emacs.html\" >Emacs</a> |
</div>
</div>"
)))
#+end_src
Now use ~/test/index.org
#+begin_src org
#+TITLE: TEST
* First head
1. point
2. two
3. three
#+end_src
Publish it as HTML. Here is relevant snips from the sourced code.
#+begin_src html
[...]
<head>
<title>TEST</title>
[....]
<body>
<div id="preamble">
<div id="top">
<h1 class="title">TEST</h1>
<div id="menu">
<a href="index.html" >Home</a> |
<a href="emacs.html" >Emacs</a> |
</div>
</div>
</div>
<div id="content">
<h1 class="title">TEST</h1>
[...]
#+end_src
Note, I never asked for the second title and this is the one I want to
go away, but I don't know how. As I pointed out in the previous case,
it seems that it may be hardcoded, but I don't know.
I use Emacs-bzr 106282 and Org-git of 20111126.
–Rasmus
--
Sent from my Emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-11-26 2:23 Publish HTML Without Title Rasmus
2011-11-26 7:40 ` Nick Dokos
@ 2011-11-27 3:31 ` Nick Dokos
2011-11-27 12:06 ` Rasmus Pank Roulund
1 sibling, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-11-27 3:31 UTC (permalink / raw)
To: Rasmus; +Cc: nicholas.dokos, emacs-orgmode
Rasmus <rasmus@gmx.us> wrote:
> Hi,
>
> I publish my website with Org. have defined my title in
> org-publish-project-alist under the :html-preamble.
>
> However, it seems that recent Orgs have become 'smart' and now I don't
> know how to disable the publishing of title and I have the title printed
> twice. As I recall this was not an issue before.
>
> It seems to stem from org-html. el around 1358:
>
> #+begin_src emacs-lisp
> ;; begin wrap around body
> (insert (format "\n<div id=\"%s\">"
> ;; FIXME org-export-html-content-div is obsolete since 7.7
> (or org-export-html-content-div
> (nth 1 org-export-html-divs)))
> ;; FIXME this should go in the preamble but is here so
> ;; that org-infojs can still find it
> "\n<h1 class=\"title\">" title "</h1>\n"))
> #+end_src
>
> Are there any known solutions to this at the moment?
>
Thanks for providing your setup. I think you are right about the code and
I don't see any way to turn it off.
It looks like another band-aid to me (and org-html definitely has more
than its fair share of those), particularly given the comment about
org-infojs: presumably, after org-infojs is fixed to look for it in
the preamble, then the <h1> header can be deleted from the "content" div
(although anything I say about HTML should be taken with a large grain
of salt).
Next question: can't you get rid of the instance in your preamble at least
temporarily? Does it have to be in the "top" div?
Nick
PS. BTW, if you want to play the blame (git blame that is) game, here
are the relevant commits:
$ git blame -L1371,1378 lisp/org-html.el
5a373f64 (David Maus 2011-09-11 16:01:59 +0200 1371) (insert (format "\n<div id=\"%s\">"
8d25fdc7 (Bastien Guerry 2011-07-27 19:23:24 +0200 1372) ;; FIXME org-export-html-content-div is obsolete since 7.7
5a373f64 (David Maus 2011-09-11 16:01:59 +0200 1373) (or org-export-html-content-div
8d25fdc7 (Bastien Guerry 2011-07-27 19:23:24 +0200 1374) (nth 1 org-export-html-divs)))
8d25fdc7 (Bastien Guerry 2011-07-27 19:23:24 +0200 1375) ;; FIXME this should go in the preamble but is here so
8d25fdc7 (Bastien Guerry 2011-07-27 19:23:24 +0200 1376) ;; that org-infojs can still find it
8d25fdc7 (Bastien Guerry 2011-07-27 19:23:24 +0200 1377) "\n<h1 class=\"title\">" title "</h1>\n"))
70de130b (Bastien Guerry 2011-03-12 05:22:41 +0100 1378)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-11-27 3:31 ` Nick Dokos
@ 2011-11-27 12:06 ` Rasmus Pank Roulund
2011-11-27 23:11 ` Nick Dokos
0 siblings, 1 reply; 8+ messages in thread
From: Rasmus Pank Roulund @ 2011-11-27 12:06 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Hi Nick,
Thanks for you answer and your verification.
> Thanks for providing your setup. I think you are right about the code
> and I don't see any way to turn it off.
>
> It looks like another band-aid to me (and org-html definitely has more
> than its fair share of those), particularly given the comment about
> org-infojs: presumably, after org-infojs is fixed to look for it in
> the preamble, then the <h1> header can be deleted from the "content"
> div
> (although anything I say about HTML should be taken with a large grain
> of salt).
The thing is, this is a 'new' thing, as the git blame log also
suggests. Which is bothersome. But okay.
> Next question: can't you get rid of the instance in your preamble at
> least
> temporarily? Does it have to be in the "top" div?
Well, you know, I would have to redesign my website. It is possible,
but I like it. . .
The header on each side is something like:
| Title | | Menu |
| Left aligned | empty space | Right aligned |
Which is rather neat IMO.
It used to work. I don't know under which version of Org I wrote
(probably mostly stole :) the original CSS but I am guessing 7.6.
I had hoped for some command I could #+BIND to have Org behave as
before, (e.g. similar to the BIND for removing \maketitle in LaTeX).
Thanks for the help,
Rasmus
--
Sent from my Emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-11-27 12:06 ` Rasmus Pank Roulund
@ 2011-11-27 23:11 ` Nick Dokos
0 siblings, 0 replies; 8+ messages in thread
From: Nick Dokos @ 2011-11-27 23:11 UTC (permalink / raw)
To: Rasmus Pank Roulund; +Cc: nicholas.dokos, emacs-orgmode
Rasmus Pank Roulund <rasmus@gmx.us> wrote:
> The thing is, this is a 'new' thing, as the git blame log also
> suggests. Which is bothersome. But okay.
>
The scenario probably went something like this: a) move the title to the
preamble because that's the Right Thing (TM) b) oops - org-info.js broke
c) revert a) and make a note to fix it once org-info.js is fixed.
Things like this happen all the time: the question is what exactly broke
your web site. You could do some git archaelogy e.g. and figure out when
things were working and when they broke and go through the ML and figure out
why things changed the way they did etc. I suspect it's not worth your time
though.
> > Next question: can't you get rid of the instance in your preamble at
> > least
> > temporarily? Does it have to be in the "top" div?
>
> Well, you know, I would have to redesign my website. It is possible,
> but I like it. . .
>
> The header on each side is something like:
>
> | Title | | Menu |
> | Left aligned | empty space | Right aligned |
>
> Which is rather neat IMO.
>
> It used to work. I don't know under which version of Org I wrote
> (probably mostly stole :) the original CSS but I am guessing 7.6.
>
> I had hoped for some command I could #+BIND to have Org behave as
> before, (e.g. similar to the BIND for removing \maketitle in LaTeX).
>
You can just use your own private patch to org-html.el to get rid of the
offending entry and just keep rebasing it on top of any updates. There
is a section in the FAQ that describes the process. Then when things settle
down and depending on *how* they settle down, you can either throw the patch
away (if everything ends up working without it) or submit it for inclusion.
The relevant section of the FAQ is
http://orgmode.org/worg/org-faq.html#keeping-local-changes-current-with-Org-mode-development
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-11-26 13:40 ` Rasmus Pank Roulund
@ 2011-12-11 16:23 ` Bastien
2011-12-12 1:11 ` Rasmus
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-12-11 16:23 UTC (permalink / raw)
To: Rasmus Pank Roulund; +Cc: nicholas.dokos, emacs-orgmode
Hi Rasmus,
Rasmus Pank Roulund <rasmus@gmx.us> writes:
> Note, I never asked for the second title and this is the one I want to
> go away, but I don't know how. As I pointed out in the previous case,
> it seems that it may be hardcoded, but I don't know.
Yes, this is hardcoded. Hopefully we will get rid of such problems in
the next versions of org-html.el. For now, you can simply use a css to
make this title invisible:
.title {display:none;}
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Publish HTML Without Title
2011-12-11 16:23 ` Bastien
@ 2011-12-12 1:11 ` Rasmus
0 siblings, 0 replies; 8+ messages in thread
From: Rasmus @ 2011-12-12 1:11 UTC (permalink / raw)
To: Bastien; +Cc: nicholas.dokos, emacs-orgmode
Bastien <bzg@altern.org> writes:
> Hi Rasmus,
>
> Rasmus Pank Roulund <rasmus@gmx.us> writes:
>
>> Note, I never asked for the second title and this is the one I want to
>> go away, but I don't know how. As I pointed out in the previous case,
>> it seems that it may be hardcoded, but I don't know.
>
> Yes, this is hardcoded. Hopefully we will get rid of such problems in
> the next versions of org-html.el. For now, you can simply use a css to
> make this title invisible:
>
> .title {display:none;}
But I do want the title. I just want it where I coded it to be and not
where Org coded it to be.
I am looking forward to org-html-next.
Thanks,
Rasmus
--
Sent from my Emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-12 1:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-26 2:23 Publish HTML Without Title Rasmus
2011-11-26 7:40 ` Nick Dokos
2011-11-26 13:40 ` Rasmus Pank Roulund
2011-12-11 16:23 ` Bastien
2011-12-12 1:11 ` Rasmus
2011-11-27 3:31 ` Nick Dokos
2011-11-27 12:06 ` Rasmus Pank Roulund
2011-11-27 23:11 ` Nick Dokos
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).