emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Add HTML after <body> and before title
@ 2009-05-10 18:36 Daniel Clemente
  2009-05-10 19:01 ` Daniel Clemente
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Clemente @ 2009-05-10 18:36 UTC (permalink / raw)
  To: Org-mode ml


Hi,
  I have seen that all texts you include with #+TEXT are added after the title:

<body>
<div id="content">
<h1 class="title">This is the #+TITLE</h1>

<p>I added this with #+TEXT
</p>



  I have a script.js with a header which would be much better /before/ the <h1>. I know Org-mode doesn't need in general so much flexibility in exporting, but do you know incidentally some trick to insert code just after the <body> or after <div id="content">?

  Thanks,
-- Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Add HTML after <body> and before title
  2009-05-10 18:36 Add HTML after <body> and before title Daniel Clemente
@ 2009-05-10 19:01 ` Daniel Clemente
  2009-05-11  9:39   ` Sebastian Rose
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Clemente @ 2009-05-10 19:01 UTC (permalink / raw)
  To: Org-mode ml


El dom, may 10 2009, Daniel Clemente va escriure:
>some trick to insert code just after the <body> or after <div id="content">?

  Sorry, I forgot about org-publish. It can use the parameter :preamble to do exactly that. Furthermore:


,----
| org-export-html-preamble is a variable defined in `org-html.el'.
| Its value is nil
| 
| Documentation:
| Preamble, to be inserted just before <body>.  Set by publishing functions.
`----



  I prefer to always embed the configuration inside the .org file instead of in Elisp code, but if this is only possible with org-publish, I should use it.


-- Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: Add HTML after <body> and before title
  2009-05-10 19:01 ` Daniel Clemente
@ 2009-05-11  9:39   ` Sebastian Rose
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Rose @ 2009-05-11  9:39 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: Org-mode ml


To include script.js into the <head> section per file:

#+STYLE:    <script type="text/javascript" src="script.js" />


Or

#+STYLE: <script type="text/javascript">
#+STYLE:  <!--/*--><![CDATA[/*><!--*/
#+STYLE:    function youCodeHere { void 0; }
#+STYLE:  /*]]>*///-->
#+STYLE: </script>


NOTE:
   there is no `document.write' in XHTML the way it was in HTML. You
   would have to call `document.open()' before and therefore erase the
   documents contents.
   So I guess putting the script in the head section might be OK.


Regards


   Sebastian


Daniel Clemente <n142857@gmail.com> writes:
> El dom, may 10 2009, Daniel Clemente va escriure: >some trick to insert code
> just after the <body> or after <div id="content">?
>
>   Sorry, I forgot about org-publish. It can use the parameter :preamble to do
> exactly that. Furthermore:
>
>
> ,----
> | org-export-html-preamble is a variable defined in `org-html.el'.  Its value is
> | nil
> | 
> | Documentation: Preamble, to be inserted just before <body>.  Set by publishing
> | functions.
> `----
>
>
>
>   I prefer to always embed the configuration inside the .org file instead of in
> Elisp code, but if this is only possible with org-publish, I should use it.
>
>
> -- Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-11  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-10 18:36 Add HTML after <body> and before title Daniel Clemente
2009-05-10 19:01 ` Daniel Clemente
2009-05-11  9:39   ` Sebastian Rose

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).