emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ian Barton <lists@manor-farm.org>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Obscure Bug with HTML Export if Directory Starts with an Underscore
Date: Wed, 02 Dec 2009 11:44:38 +0000	[thread overview]
Message-ID: <4B165326.2000902@manor-farm.org> (raw)

As part of my attempt to get org to play nicely with Jekyll, I think I 
have found a problem with html export.

My org directory structure looks like:

org|

------|mountaineering
------|cycling
------|_posts

Basically org files for blog posts go into posts. My org files look like:

#+STARTUP: showall indent
#+STARTUP: hidestars
#+OPTIONS: H:2 num:nil tags:nil toc:1 timestamps:t
#+BEGIN_HTML
---
layout: post
title: ADSL Connection Problems.
tags: [gadgets, linux, test]
excerpt: Problems, problems!
---
#+END_HTML
Main text of post goes here.

I am just exporting the body text (see below for my config). Carsten 
recently updated org to remove leading line feeds at the top of the 
exported file. So my exported file looks like:

---
layout: post
title: ADSL Connection Problems.
tags: [gadgets, linux, test]
excerpt: Problems, problems!
---

However, if the directory the file is exported from starts with an 
underscore e.g. _posts, The exporter removes the first ---. I have a 
workaround - put two lines with --- at the top of the file.


I am using the current git checkout of org. My project a list looks like:

(setq org-publish-project-alist
       '(

   ("org-ianbarton"
           ;; Path to your org files.
           :base-directory "~/devel/ianbarton/org/"
           :base-extension "org"

           ;; Path to your Jekyll project.
           :publishing-directory "~/devel/ianbarton/jekyll/"
           :recursive t
           :publishing-function org-publish-org-to-html
           :headline-levels 4
           :html-extension "html"
           :body-only t ;; Only export section between <body> </body>
     )


     ("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.

             reply	other threads:[~2009-12-02 11:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 11:44 Ian Barton [this message]
2009-12-16 23:17 ` Obscure Bug with HTML Export if Directory Starts with an Underscore Carsten Dominik
2009-12-17  8:30   ` Ian Barton

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=4B165326.2000902@manor-farm.org \
    --to=lists@manor-farm.org \
    --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).