diff --git a/Rules b/Rules index c5581bd..5b0512b 100644 --- a/Rules +++ b/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 diff --git a/config.yaml b/config.yaml index 90b15b7..fd56f54 100644 --- a/config.yaml +++ b/config.yaml @@ -4,4 +4,4 @@ data_sources: - items_root: / layouts_root: / type: filesystem_compact -base_url: http://wezm.net \ No newline at end of file +base_url: 'http://www.wezm.net' diff --git a/content/feed.xml b/content/feed.xml new file mode 100644 index 0000000..3444648 --- /dev/null +++ b/content/feed.xml @@ -0,0 +1 @@ +<%#= atom_feed %> diff --git a/content/feed.yaml b/content/feed.yaml new file mode 100644 index 0000000..e6e4512 --- /dev/null +++ b/content/feed.yaml @@ -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/ + diff --git a/content/personal/feed.xml b/content/personal/feed.xml new file mode 100644 index 0000000..1812ff3 --- /dev/null +++ b/content/personal/feed.xml @@ -0,0 +1 @@ +<%#= atom_feed(:articles => personal_articles) %> diff --git a/content/personal/feed.yaml b/content/personal/feed.yaml new file mode 100644 index 0000000..e521976 --- /dev/null +++ b/content/personal/feed.yaml @@ -0,0 +1,2 @@ +--- +title: A New Item diff --git a/content/technical/feed.xml b/content/technical/feed.xml new file mode 100644 index 0000000..b086c28 --- /dev/null +++ b/content/technical/feed.xml @@ -0,0 +1 @@ +<%#= atom_feed(:articles => technical_articles) %> diff --git a/content/technical/feed.yaml b/content/technical/feed.yaml new file mode 100644 index 0000000..e521976 --- /dev/null +++ b/content/technical/feed.yaml @@ -0,0 +1,2 @@ +--- +title: A New Item diff --git a/layouts/_header.html b/layouts/_header.html index e4a1633..404ecf4 100644 --- a/layouts/_header.html +++ b/layouts/_header.html @@ -5,8 +5,8 @@