emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Html Exporter Suppressing Blank Lines at Start
@ 2009-11-21 16:12 Ian Barton
  2009-11-21 17:58 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Barton @ 2009-11-21 16:12 UTC (permalink / raw)
  To: org-mode mailing list

I am playing with Jekyll as a possible blogging solution for org. So far 
it looks good, but there is one small problem. You can use yaml in your 
html, but it has to be the very first thing in the file:

In my org file I have:

#+STARTUP: showall indent
#+STARTUP: hidestars
#+BEGIN_HTML
---
layout: default
title: Benighted on the Ben.
---
#+END_HTML

It was early January when six of us travelled up to


When I export to html I end up with two blank lines at the top of the 
file above the first ---. Is there a way to get the html exporter not to 
insert those two blank lines?

Ian.

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

* Re: Html Exporter Suppressing Blank Lines at Start
  2009-11-21 16:12 Html Exporter Suppressing Blank Lines at Start Ian Barton
@ 2009-11-21 17:58 ` Carsten Dominik
  2009-11-21 18:42   ` Ian Barton
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2009-11-21 17:58 UTC (permalink / raw)
  To: Ian Barton; +Cc: org-mode mailing list

Hmmm, when I do this export, I get a full html file, with header and  
all, and he first "---" as the <h1> title of the document.

Could you please tell in more detail what you mean?

Thanks.

- Carsten

On Nov 21, 2009, at 5:12 PM, Ian Barton wrote:

> I am playing with Jekyll as a possible blogging solution for org. So  
> far it looks good, but there is one small problem. You can use yaml  
> in your html, but it has to be the very first thing in the file:
>
> In my org file I have:
>
> #+STARTUP: showall indent
> #+STARTUP: hidestars
> #+BEGIN_HTML
> ---
> layout: default
> title: Benighted on the Ben.
> ---
> #+END_HTML
>
> It was early January when six of us travelled up to
>
>
> When I export to html I end up with two blank lines at the top of  
> the file above the first ---. Is there a way to get the html  
> exporter not to insert those two blank lines?
>
> Ian.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: Html Exporter Suppressing Blank Lines at Start
  2009-11-21 17:58 ` Carsten Dominik
@ 2009-11-21 18:42   ` Ian Barton
  2009-11-21 19:53     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Barton @ 2009-11-21 18:42 UTC (permalink / raw)
  Cc: org-mode mailing list

> Hmmm, when I do this export, I get a full html file, with header and 
> all, and he first "---" as the <h1> title of the document.
> 
> Could you please tell in more detail what you mean?
> 
> Thanks.
> 
> - Carsten
> 
> On Nov 21, 2009, at 5:12 PM, Ian Barton wrote:
> 
>> I am playing with Jekyll as a possible blogging solution for org. So 
>> far it looks good, but there is one small problem. You can use yaml in 
>> your html, but it has to be the very first thing in the file:
>>
>> In my org file I have:
>>
>> #+STARTUP: showall indent
>> #+STARTUP: hidestars
>> #+BEGIN_HTML
>> ---
>> layout: default
>> title: Benighted on the Ben.
>> ---
>> #+END_HTML
>>
>> It was early January when six of us travelled up to
>>
>>
>> When I export to html I end up with two blank lines at the top of the 
>> file above the first ---. Is there a way to get the html exporter not 
>> to insert those two blank lines?
>>

Sorry, I should have provided more detail. Here is the relevant part of 
my org-publish-project-alist.

   ("org-ianbarton"
           :base-directory "~/devel/ianbarton/org/"
           :base-extension "org"
           :publishing-directory "~/devel/ianbarton/jekyll/"
           :recursive t
           :publishing-function org-publish-org-to-html
           :headline-levels 4             ; Just the default for this 
project.
           :html-extension "html"
           :body-only t
     )


     ("org-static-ian"
           :base-directory "~/devel/ianbarton/org/"
           :base-extension 
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|php"
           :publishing-directory "~/devel/ianbarton/"
           :recursive t
           :publishing-function org-publish-attachment)

     ("ian" :components ("org-ianbarton" "org-static-ian"))

Ian.

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

* Re: Html Exporter Suppressing Blank Lines at Start
  2009-11-21 18:42   ` Ian Barton
@ 2009-11-21 19:53     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-11-21 19:53 UTC (permalink / raw)
  To: Ian Barton; +Cc: org-mode mailing list

Hi Ian,

if you upgrade, these empty lines should be gone.

Also, there are several hooks that run once the export is done:

org-export-html-final-hook      (always)
org-publish-after-export-hook   (when going through org-publish)

These hooks can also be used to make adjustments like this one.

HTH

- Carsten


On Nov 21, 2009, at 7:42 PM, Ian Barton wrote:

>> Hmmm, when I do this export, I get a full html file, with header  
>> and all, and he first "---" as the <h1> title of the document.
>> Could you please tell in more detail what you mean?
>> Thanks.
>> - Carsten
>> On Nov 21, 2009, at 5:12 PM, Ian Barton wrote:
>>> I am playing with Jekyll as a possible blogging solution for org.  
>>> So far it looks good, but there is one small problem. You can use  
>>> yaml in your html, but it has to be the very first thing in the  
>>> file:
>>>
>>> In my org file I have:
>>>
>>> #+STARTUP: showall indent
>>> #+STARTUP: hidestars
>>> #+BEGIN_HTML
>>> ---
>>> layout: default
>>> title: Benighted on the Ben.
>>> ---
>>> #+END_HTML
>>>
>>> It was early January when six of us travelled up to
>>>
>>>
>>> When I export to html I end up with two blank lines at the top of  
>>> the file above the first ---. Is there a way to get the html  
>>> exporter not to insert those two blank lines?
>>>
>
> Sorry, I should have provided more detail. Here is the relevant part  
> of my org-publish-project-alist.
>
>  ("org-ianbarton"
>          :base-directory "~/devel/ianbarton/org/"
>          :base-extension "org"
>          :publishing-directory "~/devel/ianbarton/jekyll/"
>          :recursive t
>          :publishing-function org-publish-org-to-html
>          :headline-levels 4             ; Just the default for this  
> project.
>          :html-extension "html"
>          :body-only t
>    )
>
>
>    ("org-static-ian"
>          :base-directory "~/devel/ianbarton/org/"
>          :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\| 
> ogg\\|swf\\|php"
>          :publishing-directory "~/devel/ianbarton/"
>          :recursive t
>          :publishing-function org-publish-attachment)
>
>    ("ian" :components ("org-ianbarton" "org-static-ian"))
>
> Ian.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

end of thread, other threads:[~2009-11-21 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-21 16:12 Html Exporter Suppressing Blank Lines at Start Ian Barton
2009-11-21 17:58 ` Carsten Dominik
2009-11-21 18:42   ` Ian Barton
2009-11-21 19:53     ` Carsten Dominik

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