-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed.xml.builder
More file actions
23 lines (22 loc) · 921 Bytes
/
feed.xml.builder
File metadata and controls
23 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
site_url = "http://tgdev.github.io/"
xml.title "Sharper in Digital"
xml.subtitle "Thoughts and findings of a Front End Developer"
xml.id URI.join(site_url, blog.options.prefix.to_s)
xml.link "href" => URI.join(site_url, blog.options.prefix.to_s)
xml.link "href" => "http://tgdev.github.io/feed.xml", "rel" => "self"
xml.updated blog.articles.first.date.to_time.iso8601
xml.author { xml.name "Tom Gillard" }
blog.articles[0..5].each do |article|
xml.entry do
xml.title article.title
xml.link "rel" => "alternate", "href" => URI.join(site_url, article.url)
xml.id URI.join(site_url, article.url)
xml.published article.date.to_time.iso8601
xml.updated File.mtime(article.source_file).iso8601
# xml.author { xml.name "Tom Gillard" }
xml.content article.body, "type" => "html"
end
end
end