all repos — h3rald @ 0f26f3ec2fe9ccd3e066080a1d803d6af223e515

The sources of https://h3rald.com

Implemented tag feed generation.
* Closes #9.
h3rald h3rald@h3rald.com
Sat, 29 Aug 2009 21:55:25 +0200
commit

0f26f3ec2fe9ccd3e066080a1d803d6af223e515

parent

9e906fef3201e00338c026e194dcad57fbaba9a7

123 files changed, 563 insertions(+), 14 deletions(-)

jump to
M RulesRules

@@ -26,6 +26,10 @@ end

layout 'default' end +route /\/tags\/.+?-(atom|rss)/ do + item.identifier.gsub(/(.+)-(rss|atom)\/$/, '\1/\2') + '.xml' +end + route '/(atom|rss)/' do item.identifier.gsub(/\/$/, '') + '.xml' end
M content/atom.xmlcontent/atom.xml

@@ -1,7 +1,6 @@

--- permalink: 'atom' type: 'feed' -title: 'Latest Articles (Atom) - HERALD' -path: '/atom/' +title: 'H3RALD - Articles (Atom Feed)' --- <%= atom_feed %>
M content/home.textilecontent/home.textile

@@ -6,6 +6,7 @@ - redcloth

title: Home type: page feed: '/' +feed_title: 'Latest Articles' ----- <% max_items = 5
M content/rss.xmlcontent/rss.xml

@@ -1,7 +1,6 @@

--- permalink: 'rss' type: 'feed' -title: 'Latest Articles (RSS) - HERALD' -path: '/rss/' +title: 'H3RALD - Articles (RSS Feed)' --- <%= rss_feed %>
A content/tags/ajax-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'ajax' (Atom Feed) +:permalink: tags/ajax/atom +----- +<%= atom_feed(:articles => articles_tagged_with('ajax'))%>
A content/tags/ajax-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'ajax' (RSS Feed) +:permalink: tags/ajax/rss +----- +<%= rss_feed(:articles => articles_tagged_with('ajax'))%>
M content/tags/ajax.textilecontent/tags/ajax.textile

@@ -4,6 +4,8 @@ :title: "Tag: ajax"

:filters_pre: - erb - redcloth +:feed: /tags/ajax/ +:feed_title: Tag 'ajax' :permalink: ajax -----
A content/tags/books-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'books' (Atom Feed) +:permalink: tags/books/atom +----- +<%= atom_feed(:articles => articles_tagged_with('books'))%>
A content/tags/books-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'books' (RSS Feed) +:permalink: tags/books/rss +----- +<%= rss_feed(:articles => articles_tagged_with('books'))%>
M content/tags/books.textilecontent/tags/books.textile

@@ -4,6 +4,8 @@ :title: "Tag: books"

:filters_pre: - erb - redcloth +:feed: /tags/books/ +:feed_title: Tag 'books' :permalink: books -----
A content/tags/browsers-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'browsers' (Atom Feed) +:permalink: tags/browsers/atom +----- +<%= atom_feed(:articles => articles_tagged_with('browsers'))%>
A content/tags/browsers-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'browsers' (RSS Feed) +:permalink: tags/browsers/rss +----- +<%= rss_feed(:articles => articles_tagged_with('browsers'))%>
M content/tags/browsers.textilecontent/tags/browsers.textile

@@ -4,6 +4,8 @@ :title: "Tag: browsers"

:filters_pre: - erb - redcloth +:feed: /tags/browsers/ +:feed_title: Tag 'browsers' :permalink: browsers -----
A content/tags/cakephp-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'cakephp' (Atom Feed) +:permalink: tags/cakephp/atom +----- +<%= atom_feed(:articles => articles_tagged_with('cakephp'))%>
A content/tags/cakephp-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'cakephp' (RSS Feed) +:permalink: tags/cakephp/rss +----- +<%= rss_feed(:articles => articles_tagged_with('cakephp'))%>
M content/tags/cakephp.textilecontent/tags/cakephp.textile

@@ -4,6 +4,8 @@ :title: "Tag: cakephp"

:filters_pre: - erb - redcloth +:feed: /tags/cakephp/ +:feed_title: Tag 'cakephp' :permalink: cakephp -----
A content/tags/concatenative-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'concatenative' (Atom Feed) +:permalink: tags/concatenative/atom +----- +<%= atom_feed(:articles => articles_tagged_with('concatenative'))%>
A content/tags/concatenative-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'concatenative' (RSS Feed) +:permalink: tags/concatenative/rss +----- +<%= rss_feed(:articles => articles_tagged_with('concatenative'))%>
M content/tags/concatenative.textilecontent/tags/concatenative.textile

@@ -4,6 +4,8 @@ :title: "Tag: concatenative"

:filters_pre: - erb - redcloth +:feed: /tags/concatenative/ +:feed_title: Tag 'concatenative' :permalink: concatenative -----
A content/tags/databases-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'databases' (Atom Feed) +:permalink: tags/databases/atom +----- +<%= atom_feed(:articles => articles_tagged_with('databases'))%>
A content/tags/databases-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'databases' (RSS Feed) +:permalink: tags/databases/rss +----- +<%= rss_feed(:articles => articles_tagged_with('databases'))%>
M content/tags/databases.textilecontent/tags/databases.textile

@@ -4,6 +4,8 @@ :title: "Tag: databases"

:filters_pre: - erb - redcloth +:feed: /tags/databases/ +:feed_title: Tag 'databases' :permalink: databases -----
A content/tags/firefox-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'firefox' (Atom Feed) +:permalink: tags/firefox/atom +----- +<%= atom_feed(:articles => articles_tagged_with('firefox'))%>
A content/tags/firefox-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'firefox' (RSS Feed) +:permalink: tags/firefox/rss +----- +<%= rss_feed(:articles => articles_tagged_with('firefox'))%>
M content/tags/firefox.textilecontent/tags/firefox.textile

@@ -4,6 +4,8 @@ :title: "Tag: firefox"

:filters_pre: - erb - redcloth +:feed: /tags/firefox/ +:feed_title: Tag 'firefox' :permalink: firefox -----
A content/tags/frameworks-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'frameworks' (Atom Feed) +:permalink: tags/frameworks/atom +----- +<%= atom_feed(:articles => articles_tagged_with('frameworks'))%>
A content/tags/frameworks-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'frameworks' (RSS Feed) +:permalink: tags/frameworks/rss +----- +<%= rss_feed(:articles => articles_tagged_with('frameworks'))%>
M content/tags/frameworks.textilecontent/tags/frameworks.textile

@@ -4,6 +4,8 @@ :title: "Tag: frameworks"

:filters_pre: - erb - redcloth +:feed: /tags/frameworks/ +:feed_title: Tag 'frameworks' :permalink: frameworks -----
A content/tags/google-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'google' (Atom Feed) +:permalink: tags/google/atom +----- +<%= atom_feed(:articles => articles_tagged_with('google'))%>
A content/tags/google-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'google' (RSS Feed) +:permalink: tags/google/rss +----- +<%= rss_feed(:articles => articles_tagged_with('google'))%>
M content/tags/google.textilecontent/tags/google.textile

@@ -4,6 +4,8 @@ :title: "Tag: google"

:filters_pre: - erb - redcloth +:feed: /tags/google/ +:feed_title: Tag 'google' :permalink: google -----
A content/tags/ie-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'ie' (Atom Feed) +:permalink: tags/ie/atom +----- +<%= atom_feed(:articles => articles_tagged_with('ie'))%>
A content/tags/ie-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'ie' (RSS Feed) +:permalink: tags/ie/rss +----- +<%= rss_feed(:articles => articles_tagged_with('ie'))%>
M content/tags/ie.textilecontent/tags/ie.textile

@@ -4,6 +4,8 @@ :title: "Tag: ie"

:filters_pre: - erb - redcloth +:feed: /tags/ie/ +:feed_title: Tag 'ie' :permalink: ie -----
A content/tags/internet-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'internet' (Atom Feed) +:permalink: tags/internet/atom +----- +<%= atom_feed(:articles => articles_tagged_with('internet'))%>
A content/tags/internet-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'internet' (RSS Feed) +:permalink: tags/internet/rss +----- +<%= rss_feed(:articles => articles_tagged_with('internet'))%>
M content/tags/internet.textilecontent/tags/internet.textile

@@ -4,6 +4,8 @@ :title: "Tag: internet"

:filters_pre: - erb - redcloth +:feed: /tags/internet/ +:feed_title: Tag 'internet' :permalink: internet -----
A content/tags/italy-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'italy' (Atom Feed) +:permalink: tags/italy/atom +----- +<%= atom_feed(:articles => articles_tagged_with('italy'))%>
A content/tags/italy-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'italy' (RSS Feed) +:permalink: tags/italy/rss +----- +<%= rss_feed(:articles => articles_tagged_with('italy'))%>
M content/tags/italy.textilecontent/tags/italy.textile

@@ -4,6 +4,8 @@ :title: "Tag: italy"

:filters_pre: - erb - redcloth +:feed: /tags/italy/ +:feed_title: Tag 'italy' :permalink: italy -----
A content/tags/microsoft-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'microsoft' (Atom Feed) +:permalink: tags/microsoft/atom +----- +<%= atom_feed(:articles => articles_tagged_with('microsoft'))%>
A content/tags/microsoft-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'microsoft' (RSS Feed) +:permalink: tags/microsoft/rss +----- +<%= rss_feed(:articles => articles_tagged_with('microsoft'))%>
M content/tags/microsoft.textilecontent/tags/microsoft.textile

@@ -4,6 +4,8 @@ :title: "Tag: microsoft"

:filters_pre: - erb - redcloth +:feed: /tags/microsoft/ +:feed_title: Tag 'microsoft' :permalink: microsoft -----
A content/tags/opensource-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'opensource' (Atom Feed) +:permalink: tags/opensource/atom +----- +<%= atom_feed(:articles => articles_tagged_with('opensource'))%>
A content/tags/opensource-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'opensource' (RSS Feed) +:permalink: tags/opensource/rss +----- +<%= rss_feed(:articles => articles_tagged_with('opensource'))%>
M content/tags/opensource.textilecontent/tags/opensource.textile

@@ -4,6 +4,8 @@ :title: "Tag: opensource"

:filters_pre: - erb - redcloth +:feed: /tags/opensource/ +:feed_title: Tag 'opensource' :permalink: opensource -----
A content/tags/opera-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'opera' (Atom Feed) +:permalink: tags/opera/atom +----- +<%= atom_feed(:articles => articles_tagged_with('opera'))%>
A content/tags/opera-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'opera' (RSS Feed) +:permalink: tags/opera/rss +----- +<%= rss_feed(:articles => articles_tagged_with('opera'))%>
M content/tags/opera.textilecontent/tags/opera.textile

@@ -4,6 +4,8 @@ :title: "Tag: opera"

:filters_pre: - erb - redcloth +:feed: /tags/opera/ +:feed_title: Tag 'opera' :permalink: opera -----
A content/tags/personal-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'personal' (Atom Feed) +:permalink: tags/personal/atom +----- +<%= atom_feed(:articles => articles_tagged_with('personal'))%>
A content/tags/personal-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'personal' (RSS Feed) +:permalink: tags/personal/rss +----- +<%= rss_feed(:articles => articles_tagged_with('personal'))%>
M content/tags/personal.textilecontent/tags/personal.textile

@@ -4,6 +4,8 @@ :title: "Tag: personal"

:filters_pre: - erb - redcloth +:feed: /tags/personal/ +:feed_title: Tag 'personal' :permalink: personal -----
A content/tags/personal_log-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'personal_log' (Atom Feed) +:permalink: tags/personal_log/atom +----- +<%= atom_feed(:articles => articles_tagged_with('personal_log'))%>
A content/tags/personal_log-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'personal_log' (RSS Feed) +:permalink: tags/personal_log/rss +----- +<%= rss_feed(:articles => articles_tagged_with('personal_log'))%>
M content/tags/personal_log.textilecontent/tags/personal_log.textile

@@ -4,6 +4,8 @@ :title: "Tag: personal_log"

:filters_pre: - erb - redcloth +:feed: /tags/personal_log/ +:feed_title: Tag 'personal_log' :permalink: personal_log -----
A content/tags/php-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'php' (Atom Feed) +:permalink: tags/php/atom +----- +<%= atom_feed(:articles => articles_tagged_with('php'))%>
A content/tags/php-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'php' (RSS Feed) +:permalink: tags/php/rss +----- +<%= rss_feed(:articles => articles_tagged_with('php'))%>
M content/tags/php.textilecontent/tags/php.textile

@@ -4,6 +4,8 @@ :title: "Tag: php"

:filters_pre: - erb - redcloth +:feed: /tags/php/ +:feed_title: Tag 'php' :permalink: php -----
A content/tags/politics-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'politics' (Atom Feed) +:permalink: tags/politics/atom +----- +<%= atom_feed(:articles => articles_tagged_with('politics'))%>
A content/tags/politics-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'politics' (RSS Feed) +:permalink: tags/politics/rss +----- +<%= rss_feed(:articles => articles_tagged_with('politics'))%>
M content/tags/politics.textilecontent/tags/politics.textile

@@ -4,6 +4,8 @@ :title: "Tag: politics"

:filters_pre: - erb - redcloth +:feed: /tags/politics/ +:feed_title: Tag 'politics' :permalink: politics -----
A content/tags/productivity-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'productivity' (Atom Feed) +:permalink: tags/productivity/atom +----- +<%= atom_feed(:articles => articles_tagged_with('productivity'))%>
A content/tags/productivity-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'productivity' (RSS Feed) +:permalink: tags/productivity/rss +----- +<%= rss_feed(:articles => articles_tagged_with('productivity'))%>
M content/tags/productivity.textilecontent/tags/productivity.textile

@@ -4,6 +4,8 @@ :title: "Tag: productivity"

:filters_pre: - erb - redcloth +:feed: /tags/productivity/ +:feed_title: Tag 'productivity' :permalink: productivity -----
A content/tags/programming-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'programming' (Atom Feed) +:permalink: tags/programming/atom +----- +<%= atom_feed(:articles => articles_tagged_with('programming'))%>
A content/tags/programming-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'programming' (RSS Feed) +:permalink: tags/programming/rss +----- +<%= rss_feed(:articles => articles_tagged_with('programming'))%>
M content/tags/programming.textilecontent/tags/programming.textile

@@ -4,6 +4,8 @@ :title: "Tag: programming"

:filters_pre: - erb - redcloth +:feed: /tags/programming/ +:feed_title: Tag 'programming' :permalink: programming -----
A content/tags/rails-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'rails' (Atom Feed) +:permalink: tags/rails/atom +----- +<%= atom_feed(:articles => articles_tagged_with('rails'))%>
A content/tags/rails-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'rails' (RSS Feed) +:permalink: tags/rails/rss +----- +<%= rss_feed(:articles => articles_tagged_with('rails'))%>
M content/tags/rails.textilecontent/tags/rails.textile

@@ -4,6 +4,8 @@ :title: "Tag: rails"

:filters_pre: - erb - redcloth +:feed: /tags/rails/ +:feed_title: Tag 'rails' :permalink: rails -----
A content/tags/rant-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'rant' (Atom Feed) +:permalink: tags/rant/atom +----- +<%= atom_feed(:articles => articles_tagged_with('rant'))%>
A content/tags/rant-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'rant' (RSS Feed) +:permalink: tags/rant/rss +----- +<%= rss_feed(:articles => articles_tagged_with('rant'))%>
M content/tags/rant.textilecontent/tags/rant.textile

@@ -4,6 +4,8 @@ :title: "Tag: rant"

:filters_pre: - erb - redcloth +:feed: /tags/rant/ +:feed_title: Tag 'rant' :permalink: rant -----
A content/tags/rawline-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'rawline' (Atom Feed) +:permalink: tags/rawline/atom +----- +<%= atom_feed(:articles => articles_tagged_with('rawline'))%>
A content/tags/rawline-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'rawline' (RSS Feed) +:permalink: tags/rawline/rss +----- +<%= rss_feed(:articles => articles_tagged_with('rawline'))%>
M content/tags/rawline.textilecontent/tags/rawline.textile

@@ -4,6 +4,8 @@ :title: "Tag: rawline"

:filters_pre: - erb - redcloth +:feed: /tags/rawline/ +:feed_title: Tag 'rawline' :permalink: rawline -----
A content/tags/redbook-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'redbook' (Atom Feed) +:permalink: tags/redbook/atom +----- +<%= atom_feed(:articles => articles_tagged_with('redbook'))%>
A content/tags/redbook-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'redbook' (RSS Feed) +:permalink: tags/redbook/rss +----- +<%= rss_feed(:articles => articles_tagged_with('redbook'))%>
M content/tags/redbook.textilecontent/tags/redbook.textile

@@ -4,6 +4,8 @@ :title: "Tag: redbook"

:filters_pre: - erb - redcloth +:feed: /tags/redbook/ +:feed_title: Tag 'redbook' :permalink: redbook -----
A content/tags/review-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'review' (Atom Feed) +:permalink: tags/review/atom +----- +<%= atom_feed(:articles => articles_tagged_with('review'))%>
A content/tags/review-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'review' (RSS Feed) +:permalink: tags/review/rss +----- +<%= rss_feed(:articles => articles_tagged_with('review'))%>
M content/tags/review.textilecontent/tags/review.textile

@@ -4,6 +4,8 @@ :title: "Tag: review"

:filters_pre: - erb - redcloth +:feed: /tags/review/ +:feed_title: Tag 'review' :permalink: review -----
A content/tags/ruby-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'ruby' (Atom Feed) +:permalink: tags/ruby/atom +----- +<%= atom_feed(:articles => articles_tagged_with('ruby'))%>
A content/tags/ruby-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'ruby' (RSS Feed) +:permalink: tags/ruby/rss +----- +<%= rss_feed(:articles => articles_tagged_with('ruby'))%>
M content/tags/ruby.textilecontent/tags/ruby.textile

@@ -4,6 +4,8 @@ :title: "Tag: ruby"

:filters_pre: - erb - redcloth +:feed: /tags/ruby/ +:feed_title: Tag 'ruby' :permalink: ruby -----
A content/tags/software-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'software' (Atom Feed) +:permalink: tags/software/atom +----- +<%= atom_feed(:articles => articles_tagged_with('software'))%>
A content/tags/software-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'software' (RSS Feed) +:permalink: tags/software/rss +----- +<%= rss_feed(:articles => articles_tagged_with('software'))%>
M content/tags/software.textilecontent/tags/software.textile

@@ -4,6 +4,8 @@ :title: "Tag: software"

:filters_pre: - erb - redcloth +:feed: /tags/software/ +:feed_title: Tag 'software' :permalink: software -----
A content/tags/tools-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'tools' (Atom Feed) +:permalink: tags/tools/atom +----- +<%= atom_feed(:articles => articles_tagged_with('tools'))%>
A content/tags/tools-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'tools' (RSS Feed) +:permalink: tags/tools/rss +----- +<%= rss_feed(:articles => articles_tagged_with('tools'))%>
M content/tags/tools.textilecontent/tags/tools.textile

@@ -4,6 +4,8 @@ :title: "Tag: tools"

:filters_pre: - erb - redcloth +:feed: /tags/tools/ +:feed_title: Tag 'tools' :permalink: tools -----
A content/tags/travelling-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'travelling' (Atom Feed) +:permalink: tags/travelling/atom +----- +<%= atom_feed(:articles => articles_tagged_with('travelling'))%>
A content/tags/travelling-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'travelling' (RSS Feed) +:permalink: tags/travelling/rss +----- +<%= rss_feed(:articles => articles_tagged_with('travelling'))%>
M content/tags/travelling.textilecontent/tags/travelling.textile

@@ -4,6 +4,8 @@ :title: "Tag: travelling"

:filters_pre: - erb - redcloth +:feed: /tags/travelling/ +:feed_title: Tag 'travelling' :permalink: travelling -----
A content/tags/tutorial-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'tutorial' (Atom Feed) +:permalink: tags/tutorial/atom +----- +<%= atom_feed(:articles => articles_tagged_with('tutorial'))%>
A content/tags/tutorial-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'tutorial' (RSS Feed) +:permalink: tags/tutorial/rss +----- +<%= rss_feed(:articles => articles_tagged_with('tutorial'))%>
M content/tags/tutorial.textilecontent/tags/tutorial.textile

@@ -4,6 +4,8 @@ :title: "Tag: tutorial"

:filters_pre: - erb - redcloth +:feed: /tags/tutorial/ +:feed_title: Tag 'tutorial' :permalink: tutorial -----
A content/tags/vim-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'vim' (Atom Feed) +:permalink: tags/vim/atom +----- +<%= atom_feed(:articles => articles_tagged_with('vim'))%>
A content/tags/vim-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'vim' (RSS Feed) +:permalink: tags/vim/rss +----- +<%= rss_feed(:articles => articles_tagged_with('vim'))%>
M content/tags/vim.textilecontent/tags/vim.textile

@@ -4,6 +4,8 @@ :title: "Tag: vim"

:filters_pre: - erb - redcloth +:feed: /tags/vim/ +:feed_title: Tag 'vim' :permalink: vim -----
A content/tags/web-development-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'web-development' (Atom Feed) +:permalink: tags/web-development/atom +----- +<%= atom_feed(:articles => articles_tagged_with('web-development'))%>
A content/tags/web-development-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'web-development' (RSS Feed) +:permalink: tags/web-development/rss +----- +<%= rss_feed(:articles => articles_tagged_with('web-development'))%>
M content/tags/web-development.textilecontent/tags/web-development.textile

@@ -4,6 +4,8 @@ :title: "Tag: web-development"

:filters_pre: - erb - redcloth +:feed: /tags/web-development/ +:feed_title: Tag 'web-development' :permalink: web-development -----
A content/tags/web20-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'web20' (Atom Feed) +:permalink: tags/web20/atom +----- +<%= atom_feed(:articles => articles_tagged_with('web20'))%>
A content/tags/web20-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'web20' (RSS Feed) +:permalink: tags/web20/rss +----- +<%= rss_feed(:articles => articles_tagged_with('web20'))%>
M content/tags/web20.textilecontent/tags/web20.textile

@@ -4,6 +4,8 @@ :title: "Tag: web20"

:filters_pre: - erb - redcloth +:feed: /tags/web20/ +:feed_title: Tag 'web20' :permalink: web20 -----
A content/tags/webdevelopment-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'webdevelopment' (Atom Feed) +:permalink: tags/webdevelopment/atom +----- +<%= atom_feed(:articles => articles_tagged_with('webdevelopment'))%>
A content/tags/webdevelopment-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'webdevelopment' (RSS Feed) +:permalink: tags/webdevelopment/rss +----- +<%= rss_feed(:articles => articles_tagged_with('webdevelopment'))%>
M content/tags/webdevelopment.textilecontent/tags/webdevelopment.textile

@@ -4,6 +4,8 @@ :title: "Tag: webdevelopment"

:filters_pre: - erb - redcloth +:feed: /tags/webdevelopment/ +:feed_title: Tag 'webdevelopment' :permalink: webdevelopment -----
A content/tags/website-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'website' (Atom Feed) +:permalink: tags/website/atom +----- +<%= atom_feed(:articles => articles_tagged_with('website'))%>
A content/tags/website-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'website' (RSS Feed) +:permalink: tags/website/rss +----- +<%= rss_feed(:articles => articles_tagged_with('website'))%>
M content/tags/website.textilecontent/tags/website.textile

@@ -4,6 +4,8 @@ :title: "Tag: website"

:filters_pre: - erb - redcloth +:feed: /tags/website/ +:feed_title: Tag 'website' :permalink: website -----
A content/tags/wedding-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'wedding' (Atom Feed) +:permalink: tags/wedding/atom +----- +<%= atom_feed(:articles => articles_tagged_with('wedding'))%>
A content/tags/wedding-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'wedding' (RSS Feed) +:permalink: tags/wedding/rss +----- +<%= rss_feed(:articles => articles_tagged_with('wedding'))%>
M content/tags/wedding.textilecontent/tags/wedding.textile

@@ -4,6 +4,8 @@ :title: "Tag: wedding"

:filters_pre: - erb - redcloth +:feed: /tags/wedding/ +:feed_title: Tag 'wedding' :permalink: wedding -----
A content/tags/writing-atom.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'writing' (Atom Feed) +:permalink: tags/writing/atom +----- +<%= atom_feed(:articles => articles_tagged_with('writing'))%>
A content/tags/writing-rss.xml

@@ -0,0 +1,6 @@

+----- +:type: feed +:title: H3RALD - Tag 'writing' (RSS Feed) +:permalink: tags/writing/rss +----- +<%= rss_feed(:articles => articles_tagged_with('writing'))%>
M content/tags/writing.textilecontent/tags/writing.textile

@@ -4,6 +4,8 @@ :title: "Tag: writing"

:filters_pre: - erb - redcloth +:feed: /tags/writing/ +:feed_title: Tag 'writing' :permalink: writing -----
M layouts/default.htmlayouts/default.htm

@@ -7,8 +7,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head> <title><%= @item[:title] %> - H3RALD</title> <% if @item[:feed] then %> - <link rel="alternate" type="application/rss+xml" title="RSS" href="<%= @item[:feed]%>rss/" /> - <link rel="alternate" type="application/atom+xml" title="ATOM" href="<%= @item[:feed]%>atom/" /> + <link rel="alternate" type="application/rss+xml" title="H3RALD - <%= @item[:feed_title]%> (RSS Feed)" href="<%= @item[:feed]%>rss/" /> + <link rel="alternate" type="application/atom+xml" title="H3RALD - <%= @item[:feed_title]%> (Atom Feed)" href="<%= @item[:feed]%>atom/" /> <% end %> <meta name="author" content="Fabio Cevasco" /> <meta name="copyright" content="Fabio Cevasco" />
M lib/helpers.rblib/helpers.rb

@@ -34,6 +34,7 @@

module Nanoc3::Helpers::Blogging def reencode_html_entities(string) +=begin require 'htmlentities' $KCODE = 'u' coder = HTMLEntities.new

@@ -43,6 +44,7 @@ coder.encode(coder.decode(m), :decimal)

end # Encode & in URLs string.gsub! /&(.+?)=/, '&amp;\1=' +=end string end

@@ -110,7 +112,7 @@ xml.id @site.config[:base_url] + '/'

xml.title @item[:title] xml.updated @item[:last][:date].to_iso8601_time xml.link(:rel => 'alternate', :href => @site.config[:base_url]) - xml.link(:rel => 'self', :href => @site.config[:base_url]+@item[:path]) + xml.link(:rel => 'self', :href => @site.config[:base_url]+"/#{@item[:permalink]}/") xml.author do xml.name @item[:author_name] xml.uri @item[:author_uri]

@@ -121,7 +123,7 @@ xml.entry do

xml.id atom_tag_for(a) xml.title a[:title] xml.published a[:date].to_iso8601_time - xml.updated (a.mtime-count).to_iso8601_time + xml.updated((a.mtime-count).to_iso8601_time) count = count+1 xml.link(:rel => 'alternate', :href => url_for(a)) a[:tags].each do |t|
M lib/utils.rblib/utils.rb

@@ -1,11 +1,12 @@

module SiteUtils def write_tag_page(dir, tag, count) - # Create tag page meta = {} meta[:title] = "Tag: #{tag}" meta[:type] = 'page' meta[:filters_pre] = ['erb', 'redcloth'] + meta[:feed] = "/tags/#{tag}/" + meta[:feed_title] = "Tag '#{tag}'" meta[:permalink] = tag pl = (count == 1) ? ' is' : 's are' contents = %{\n#{count} item#{pl} tagged with _#{tag}_:

@@ -18,8 +19,17 @@ # Write html page

write_item dir/"#{tag}.textile", meta, contents end + def write_tag_feed_page(dir, tag, format) + f = format.downcase + meta = {} + meta[:title] = "H3RALD - Tag '#{tag}' (#{format} Feed)" + meta[:type] = 'feed' + meta[:permalink] = "tags/#{tag}/#{f}" + contents = %{<%= #{f}_feed(:articles => articles_tagged_with('#{tag}'))%>} + write_item dir/"#{tag}-#{f}.xml", meta, contents + end + def write_archive_page(dir, name, count) - # Create archive page meta = {} meta[:title] = "Archive: #{name}" meta[:type] = 'page'
M resources/.htaccessresources/.htaccess

@@ -48,8 +48,8 @@ RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.+[^/])$ /$1/ [R=301] - RewriteRule ^rss/$ /rss.xml [L] - RewriteRule ^atom/$ /atom.xml [L] + RewriteRule ^(rss|atom)/$ /$1.xml [L] + RewriteRule ^tags/(.+)/(rss|atom)/$ /tags/$1/$2.xml [L] RewriteRule ^$ /home/index.html [L] </IfModule>
M tasks/site.raketasks/site.rake

@@ -9,7 +9,7 @@ include SiteUtils

namespace :site do - task :clear_output do + task :clean do output = Pathname.new(Dir.pwd)/'output' puts "Deleting all files in output dir..." output.rmtree

@@ -24,7 +24,7 @@ task :run => [:copy_resources] do

system "nanoc3 aco -s thin" end - task :rebuild => [:clear_output, :update] do + task :rebuild => [:clean, :update] do end task :tags do

@@ -48,6 +48,8 @@ end

# Write pages tags.each_pair do |k, v| write_tag_page dir, k, v + write_tag_feed_page dir, k, 'RSS' + write_tag_feed_page dir, k, 'Atom' end end