emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Finally jekyll and org-jekyll


From: Ian Barton
Subject: Re: [Orgmode] Re: Finally jekyll and org-jekyll
Date: Thu, 12 Aug 2010 12:34:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

On 12/08/10 09:04, Andrea Crotti wrote:
> Ian Barton <address@hidden> writes:
> 
>>>
>> Hi Andrea,
>>
>> I don't use org-jekyll myself. You can view my tutorial on the way I
>> di it at http://orgmode.org/worg/org-tutorials/org-jekyll.php
>> . Basically what you need to do is to organize your system so that org
>> publishes your .org files to html in a place that jekyll can process
>> them.
>>
>> Are you trying to write a blog ie. posts ordered in date format, or a
>> static web site, or a combination of both? If you can tell me exactly
>> what you want to achieve, I'll try and help out.
>>
>> Ian.
> 
> Thanks, I would like to have a mixed approach, but also just a blog with
> articles might be perfectly fine for now.
> 
> So reading again I think I got it, I create the index.html showing the
> lasts posts (for example), I eventually add some CSS and then I export
> the org-files in the right place.
> 
> Org-jekyll helps giving the right name to the html files so that is
> automatically recognized by jekyll.
> Then I want to export it to github pages, but that should be already
> set up correctly.
> 
> Is that correct?
> A not about the tutorial (which is very clear): you should quote the "_"
> otherwise, like
> \_posts or project\_name
> for example.
> 

That's right, you are basically using org-publish to create the html
files and put them in the correct directory for jekyll to process.

It's easy to create a mixed site. You need to create separate jekyll
layouts for the static part and the blog part. In the blog index layout
you want something like;

{% for post in site.categories.blog %}
  {% if post.categories contains 'mountaineering' %}
    <li><span>{{ post.date | date_to_string }}</span> - {{ post.title
}}</li>

  {% endif %}

{% endfor %}

In your org file you would have:

#+BEGIN_HTML
---
title: Montane Terra Pants.
layout: post
categories: [blog, mountaineering]
excerpt: "Montane Terras are lightweight walking-climbing trousers, with
several neat features."

comments: true
---
#+END_HTML

This would create a page which displayed posts categorized as blog and
mountaineering.

Ian.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]