Get feeds partially working

Need to install the builder gem
This commit is contained in:
Wesley Moore 2010-03-10 19:54:25 +11:00
parent e4a11f7a7a
commit b44a648002
9 changed files with 30 additions and 4 deletions

15
Rules
View file

@ -1,5 +1,7 @@
#!/usr/bin/env ruby
require 'pathname'
compile '/' do
layout 'home'
end
@ -19,15 +21,26 @@ compile %r(/\d{4}/*) do
layout 'default'
end
compile %r{.*/feed/} do
filter :erb
end
compile '*' do
filter :rdiscount
layout 'default'
end
route '*/json/' do
item.identifier + 'articles.json'
path = Pathname(item.identifier)
(path.dirname + 'articles.json').to_s
end
route %r{.*/feed/} do
path = Pathname(item.identifier)
path.cleanpath.to_s + '.xml'
end
route '*' do
item.identifier + 'index.html'
end

View file

@ -4,4 +4,4 @@ data_sources:
- items_root: /
layouts_root: /
type: filesystem_compact
base_url: http://wezm.net
base_url: 'http://www.wezm.net'

1
content/feed.xml Normal file
View file

@ -0,0 +1 @@
<%#= atom_feed %>

6
content/feed.yaml Normal file
View file

@ -0,0 +1,6 @@
---
title: WezM.net - All articles
author_name: Wesley Moore
author_uri: http://www.wezm.net/about/
#feed_url: http://feeds.feedburner.com/wezm/

View file

@ -0,0 +1 @@
<%#= atom_feed(:articles => personal_articles) %>

View file

@ -0,0 +1,2 @@
---
title: A New Item

View file

@ -0,0 +1 @@
<%#= atom_feed(:articles => technical_articles) %>

View file

@ -0,0 +1,2 @@
---
title: A New Item

View file

@ -5,8 +5,8 @@
<li><a href="/about/">About</a></li>
<li><a href="/about/">Projects</a></li>
<li>
<a href="<%= feed_url %>"><img src="/images/white-feed-icon.png" width="12" height="12" /></a>
<a href="<%= feed_url %>">Feed</a>
<a href="/feed.xml"><img src="/images/white-feed-icon.png" width="12" height="12" /></a>
<a href="/feed.xml">Feed</a>
</li>
</ul>
<a href="/">WezM<sup>.net</sup></a>