mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-18 18:29:54 +00:00
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
|
||||
|
||||
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
|
||||
|
|
|
@ -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
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/">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>
|
||||
|
|
Loading…
Reference in a new issue