Browse files

Add some links to the RSS feed

  • Loading branch information...
1 parent 9ad6597 commit b04e11c637785046e5787abed0c4a9295a1471fd @afresh1 committed Dec 1, 2012
Showing with 10 additions and 3 deletions.
  1. +10 −3 OpenBSDtracker
View
13 OpenBSDtracker
@@ -73,6 +73,12 @@ helper torrents => sub {
return $torrents;
};
+helper rss_url => sub {
+ my ($self) = @_;
+ my $url = $self->url_for eq '/' ? 'torrents' : undef;
+ return $self->url_with( $url, format => 'xml' )->to_abs;
+};
+
# Documentation browser under "/perldoc"
plugin 'PODRenderer' if app->mode eq 'development';
@@ -301,6 +307,7 @@ $(document).ready(function() {
<html>
<head>
<title><%= title %></title>
+%= tag 'link', rel => 'alternate', type => 'application/rss+xml', title => 'RSS Feed', href => rss_url;
%= stylesheet begin
%= include 'inc/style', format => 'css';
% end
@@ -557,9 +564,9 @@ img {
<a href="/"><img src="/images/bsdtorrent.png" alt="OpenBSD Torrents" /></a>
</p>
<h1>OpenBSD Torrents
-% #= link_to url_with( format => 'xml' )->to_abs => begin
-% # <span class="rsslink" style="vertical-align: top;">RSS</span>
-% # end;
+%= link_to rss_url() => begin
+ <span class="rsslink" style="vertical-align: top;">RSS</span>
+% end;
</h1>
<h4>
Please be sure to support the <a href="http://www.openbsd.org">OpenBSD</a>

0 comments on commit b04e11c

Please sign in to comment.