26 lines
1.0 KiB
Ruby
26 lines
1.0 KiB
Ruby
xml.instruct!
|
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
|
site_url = "http://bascht.com/"
|
|
xml.title "bascht.com"
|
|
xml.subtitle "Digitaler Kopfbahnhof"
|
|
xml.id URI.join(site_url, blog(:bascht).options.prefix.to_s)
|
|
xml.link "href" => URI.join(site_url, blog(:bascht).options.prefix.to_s)
|
|
xml.link "href" => URI.join(site_url, current_page.path), "rel" => "self"
|
|
xml.updated(blog(:bascht).articles.first.date.to_time.iso8601) unless blog(:bascht).articles.empty?
|
|
xml.author { xml.name "Bascht" }
|
|
|
|
blog(:bascht).articles[0..10].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 "Bascht" }
|
|
# xml.summary article.summary, "type" => "html"
|
|
xml.tags article.tags
|
|
xml.content article.body, "type" => "html"
|
|
end
|
|
end
|
|
end
|