From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: Org as a static site generator Date: Sat, 06 Apr 2013 10:15:35 -0500 Message-ID: <87fvz37krs.fsf@earlgrey.lan> References: <87y5d2cxmz.fsf@engster.org>, <3673494705AD49FDB17566C5302436B0@gmail.com>, <87ppyecvpb.fsf@engster.org>, , <5159DB5F.2050307@wilkesley.net>, <87li8x6k3z.fsf@earlgrey.lan>, <20130406080154.GA13510@mail2.wilkesley.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOUpp-00012J-QA for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 11:15:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOUpj-0001x9-Na for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 11:15:17 -0400 Received: from li424-160.members.linode.com ([50.116.34.160]:43409 helo=dustycloud.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOUpj-0001x5-Js for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 11:15:11 -0400 In-reply-to: <20130406080154.GA13510@mail2.wilkesley.net> 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: "ian@manor-farm.org"@li40-130.members.linode.com Cc: emacs-orgmode@gnu.org Cool, thanks for that info! Ian Barton writes: > On Fri, Apr 05, 2013 at 11:02:56AM -0500, Christopher Allan Webber wrote: >> Ian Barton writes: >> >> > On 01/04/13 13:08, Vincent Beffara wrote: >> > >> >> Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... >> >>> I've also just found this, which uses Org only as a markup tool and >> >>> Jekyll to generate the site: >> >>> >> >>> http://orgmode.org/worg/org-tutorials/org-jekyll.html >> >> I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? >> >> >> >> /v >> >> >> > As the original author of that page, I agree that using Jekyll is >> > convoluted, but it gives you much more control. However I now use >> > Pelican: https://pelican.readthedocs.org/en/3.1.1/ >> > >> > There are a few reasons for this. Pelican is written in Python, which I >> > find easier to hack on. It is more flexible than Jekyll, which I found >> > hard to get to work the way I wanted with categories and tags. >> > >> > I wrote a yaml importer for Pelican so I could use my old jekyll posts. >> > However, Pelican understands Markdown, which I think the new exporter >> > supports. >> > >> > So my work flow now is Emacs-> export as html -> run Jekyll >> > >> > Ian. >> >> Heya Ian, >> >> I've been planning to switch my blog over to pelican. It's cool to hear >> you say this. >> >> Is there any special elisp you use for the export, including converting >> things like the title, etc? >> >> Thanks! >> - Chris > > > Hi Chris, > > No, nothing special. I just use org's standard publish functions. However, I publish only the body part of the html and place the yaml tags in the org file. A typical org file for a blog post would look like: > > > #+STARTUP: showall indent > #+STARTUP: hidestars > #+OPTIONS: H:2 num:nil tags:nil toc:nil timestamps:nil > #+BEGIN_HTML > --- > title: My Fire Steel Crumbles to Dust. > date: 2013-02-17 > tags: [gear] > category: blog > > --- > #+END_HTML > > After my walk over Moel Famau and Moel Arthur I was looking forward > to making a hot drink. My brew kit lives permanently in the boot of > > > > org pubish then creates a file with a yaml header and html body text. Then I just run Pelican to publish the post. I have written a Pelican yaml reader which converts the yaml files to allow Pelican to process them. I'll document the whole process over the next couple of days and put it on Worg. I keep meaning to contribute my yaml reader back to Pelican, but it's quite specific to publishing org-mode files and not really a general purpose yaml importer. > > > -- > > Best wishes, > > Ian.