From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Re: Finally jekyll and org-jekyll Date: Thu, 12 Aug 2010 12:34:37 +0100 Message-ID: <4C63DC4D.2020501@manor-farm.org> References: <4C630E50.60708@manor-farm.org> Reply-To: lists@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=44515 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjoHa-0004yy-Pk for emacs-orgmode@gnu.org; Fri, 13 Aug 2010 03:02:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjoGx-0008B3-Mm for emacs-orgmode@gnu.org; Fri, 13 Aug 2010 03:01:48 -0400 Received: from mail.ian-barton.com ([109.74.196.44]:34471 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjoGx-000892-Ir for emacs-orgmode@gnu.org; Fri, 13 Aug 2010 03:01:47 -0400 Received: from localhost (mail.wilkesley.org [127.0.0.1]) by li40-130.members.linode.com (Postfix) with ESMTP id E8DD0A1B5 for ; Fri, 13 Aug 2010 07:01:35 +0000 (UTC) Received: from li40-130.members.linode.com ([127.0.0.1]) by localhost (mail.manor-farm.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x++fLpPZZHhS for ; Fri, 13 Aug 2010 07:01:35 +0000 (UTC) Received: from [192.168.0.133] (unknown [217.146.125.41]) (Authenticated sender: ian@manor-farm.org) by li40-130.members.linode.com (Postfix) with ESMTPSA id 8B31D15A049 for ; Thu, 12 Aug 2010 11:34:38 +0000 (UTC) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 12/08/10 09:04, Andrea Crotti wrote: > Ian Barton 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' %}
  • {{ post.date | date_to_string }} - {{ post.title }}
  • {% 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.