Browse Source

Add RSS feed

master
parent
commit
bea447c4c6
3 changed files with 20 additions and 0 deletions
  1. +1
    -0
      config.rb
  2. +1
    -0
      source/rss/.htaccess
  3. +18
    -0
      source/rss/index.xml.erb

+ 1
- 0
config.rb View File

@@ -15,6 +15,7 @@
#
# With no layout
# page "/path/to/file.html", :layout => false
page "/rss/index.xml", :layout => false
#
# With alternative layout
# page "/path/to/file.html", :layout => :otherlayout


+ 1
- 0
source/rss/.htaccess View File

@@ -0,0 +1 @@
DirectoryIndex index.xml

+ 18
- 0
source/rss/index.xml.erb View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Drawings by Esteban Manchado</title>
<description>Drawings by Esteban Manchado</description>
<link>http://drawings.hcoder.org</link>

<% picture_info.each do |picture| %>
<item>
<title><%= picture[:name] %></title>
<link>http://drawings.hcoder.org/content/<%= picture[:name] %></link>
<description><%= picture[:description] %>&lt;br/&gt;&lt;img src="http://drawings.hcoder.org/content/thumbnails/<%= picture[:name] %>" /&gt;</description>
<pubDate><%= File.ctime("source/content/#{picture[:name]}") %></pubDate>
<guid><%= picture[:id] %></guid>
</item>
<% end %>
</channel>
</rss>

Loading…
Cancel
Save