forked from wezm/wezm.net
Get feeds partially working
Need to install the builder gem
This commit is contained in:
parent
e4a11f7a7a
commit
b44a648002
9 changed files with 30 additions and 4 deletions
15
Rules
15
Rules
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
compile '/' do
|
compile '/' do
|
||||||
layout 'home'
|
layout 'home'
|
||||||
end
|
end
|
||||||
|
@ -19,15 +21,26 @@ compile %r(/\d{4}/*) do
|
||||||
layout 'default'
|
layout 'default'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
compile %r{.*/feed/} do
|
||||||
|
filter :erb
|
||||||
|
end
|
||||||
|
|
||||||
compile '*' do
|
compile '*' do
|
||||||
filter :rdiscount
|
filter :rdiscount
|
||||||
layout 'default'
|
layout 'default'
|
||||||
end
|
end
|
||||||
|
|
||||||
route '*/json/' do
|
route '*/json/' do
|
||||||
item.identifier + 'articles.json'
|
path = Pathname(item.identifier)
|
||||||
|
(path.dirname + 'articles.json').to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
route %r{.*/feed/} do
|
||||||
|
path = Pathname(item.identifier)
|
||||||
|
path.cleanpath.to_s + '.xml'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
route '*' do
|
route '*' do
|
||||||
item.identifier + 'index.html'
|
item.identifier + 'index.html'
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,4 +4,4 @@ data_sources:
|
||||||
- items_root: /
|
- items_root: /
|
||||||
layouts_root: /
|
layouts_root: /
|
||||||
type: filesystem_compact
|
type: filesystem_compact
|
||||||
base_url: http://wezm.net
|
base_url: 'http://www.wezm.net'
|
||||||
|
|
1
content/feed.xml
Normal file
1
content/feed.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<%#= atom_feed %>
|
6
content/feed.yaml
Normal file
6
content/feed.yaml
Normal 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/
|
||||||
|
|
1
content/personal/feed.xml
Normal file
1
content/personal/feed.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<%#= atom_feed(:articles => personal_articles) %>
|
2
content/personal/feed.yaml
Normal file
2
content/personal/feed.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
title: A New Item
|
1
content/technical/feed.xml
Normal file
1
content/technical/feed.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<%#= atom_feed(:articles => technical_articles) %>
|
2
content/technical/feed.yaml
Normal file
2
content/technical/feed.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
title: A New Item
|
|
@ -5,8 +5,8 @@
|
||||||
<li><a href="/about/">About</a></li>
|
<li><a href="/about/">About</a></li>
|
||||||
<li><a href="/about/">Projects</a></li>
|
<li><a href="/about/">Projects</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= feed_url %>"><img src="/images/white-feed-icon.png" width="12" height="12" /></a>
|
<a href="/feed.xml"><img src="/images/white-feed-icon.png" width="12" height="12" /></a>
|
||||||
<a href="<%= feed_url %>">Feed</a>
|
<a href="/feed.xml">Feed</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="/">WezM<sup>.net</sup></a>
|
<a href="/">WezM<sup>.net</sup></a>
|
||||||
|
|
Loading…
Reference in a new issue