emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ian Barton <lists@manor-farm.org>
To: emacs-orgmode@gnu.org
Subject: Re: Re: Finally jekyll and org-jekyll
Date: Thu, 12 Aug 2010 12:34:37 +0100	[thread overview]
Message-ID: <4C63DC4D.2020501@manor-farm.org> (raw)
In-Reply-To: <m17hjwntnx.fsf@80-163.eduroam.rwth-aachen.de>

On 12/08/10 09:04, Andrea Crotti wrote:
> Ian Barton <lists@manor-farm.org> 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	other threads:[~2010-08-13  7:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 16:41 Finally jekyll and org-jekyll Andrea Crotti
2010-08-11 20:55 ` Ian Barton
2010-08-12  8:04   ` Andrea Crotti
2010-08-12 11:34     ` Ian Barton [this message]

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=4C63DC4D.2020501@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).