Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Long <jlong@github.com>2018-01-15 22:46:34 +0300
committerJason Long <jlong@github.com>2018-01-15 22:46:34 +0300
commit51036ccb3575fd8ba4f6cd4b8614b24e0ccb3ac8 (patch)
treea6d0f549177f4ecc2e676e697f58ac217009bf05
parent757364e068b8127869f2b46c69d2177ad8be89d1 (diff)
Convert blog/feed
-rw-r--r--app/views/blog/feed.haml20
-rw-r--r--app/views/blog/feed.html.erb22
2 files changed, 22 insertions, 20 deletions
diff --git a/app/views/blog/feed.haml b/app/views/blog/feed.haml
deleted file mode 100644
index 9c23ce2a..00000000
--- a/app/views/blog/feed.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-!!! XML
-%rss{ :version => "2.0",
- :'xmlns:content' => "http://purl.org/rss/1.0/modules/content/",
- :'xmlns:atom' => "http://www.w3.org/2005/Atom" }
- %channel
- %title Git - Blog
- %link #{request.protocol}#{request.host_with_port}
- ~raw "<atom:link href='#{request.url}' rel='self' type='application/rss+xml' />"
- %description Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
-
- -list_posts.each do |entry|
- -post = preview_post(entry[:file])
- %item
- %title #{entry[:title]}
- %guid #{format_path(entry)}
- %link #{format_path(entry)}
- -if post.last['author']
- %author #{post.last['author']}
- %pubDate #{entry[:date_published].rfc822}
- %description #{post.first}
diff --git a/app/views/blog/feed.html.erb b/app/views/blog/feed.html.erb
new file mode 100644
index 00000000..504fcebe
--- /dev/null
+++ b/app/views/blog/feed.html.erb
@@ -0,0 +1,22 @@
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
+ <channel>
+ <title>Git - Blog</title>
+ <link>#{request.protocol}#{request.host_with_port}</link>
+ <atom:link href='<%= request.url %>' rel='self' type='application/rss+xml' />
+ <description>Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.</description>
+
+ <% list_posts.each do |entry| %>
+ <% post = preview_post(entry[:file]) %>
+ <item>
+ <title>#{entry[:title]}</title>
+ <guid>#{format_path(entry)}</guid>
+ <link>#{format_path(entry)}</link>
+ <% if post.last['author'] %>
+ <author>#{post.last['author']}</author>
+ <% end %>
+ <pubDate>#{entry[:date_published].rfc822}</pubDate>
+ <description>#{post.first}</description>
+ </item>
+ <% end %>
+ </channel>
+</rss>