Created
September 2, 2009 09:46
-
-
Save kisoku/179633 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- t = Time.parse(item[:created_at]) | |
.article | |
.side | |
.date | |
.day | |
#{t.strftime("%d")} | |
.month_year | |
#{t.strftime("%b %y")} | |
.body | |
.title | |
%h2 | |
= "#{item[:title]}" if item[:title] | |
~ yield |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! | |
%html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" } | |
%head | |
%title | |
kisoku.net :: learning to breathe | |
%meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } | |
%meta{ :name => "description", :content => "Learning to breathe" } | |
%link{ :rel => "alternate", :type => "application/atom xml", :title => "Learning to Breathe", :href => "http://kisoku.net/feed/atom.xml"} | |
%link{ :rel => "stylesheet", :type => "text/css", :href => "/css/screen.css"} | |
%body | |
.container | |
.header | |
%h1 | |
%a{ :href => "/" } | |
KISOKU | |
%em | |
Learning to breathe | |
.nav | |
%ul | |
%li | |
%a{ :href => "/" } | |
blog | |
%li | |
%a{ :href => "/about.html" } | |
about | |
%li | |
%a{ :href => "http://github.com/kisoku" } | |
code | |
%li | |
%a{ :href => "http://kisoku.net/feed/atom.xml" } | |
feed | |
.content | |
~ yield | |
.footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All files in the 'lib' directory will be loaded | |
# before nanoc starts compiling. | |
require 'lorem' | |
require 'time' | |
include Nanoc3::Helpers::Blogging | |
include Nanoc3::Helpers::Rendering | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= render 'article' | |
%p | |
= Lorem::Base.new('paragraphs', 1).output | |
%p | |
= Lorem::Base.new('paragraphs', 1).output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: article | |
title: Lorem Ipsum | |
created_at: "2009-08-24T15:39:29+09:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
compile '/feed/*' do | |
filter :erb | |
end | |
compile '*' do | |
filter :haml | |
layout 'default' | |
end | |
route '/feed/atom/' do | |
'/feed/atom.xml' | |
end | |
route '/' do | |
item.identifier + "index.html" | |
end | |
route '/*' do | |
item.identifier.chop + '.html' | |
end | |
layout '*', :haml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment