File: feed.xhtml

package info (click to toggle)
ruby-ramaze 2012.12.08-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,060 kB
  • ctags: 1,200
  • sloc: ruby: 10,446; makefile: 8
file content (23 lines) | stat: -rw-r--r-- 769 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"
xml:base="http://localhost:7000/">
    <id>tag:ramaze-blog</id>
    <title>Ramaze Blog</title>
    <updated>#{@posts.last.created_at.strftime('%Y-%m-%dT%H:%M:%SZ')}</updated>

    <?r @posts.each do |post| ?>
    <entry>
        <id>tag:ramaze-blog,#{post.id}</id>
        <title>#{post.title}</title>
        <author>
            <name>#{post.user.username}</name>
        </author>
        <updated>#{post.created_at.strftime('%Y-%m-%dT%H:%M:%SZ')}</updated>
        <content type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                #{RDiscount.new(post.body).to_html}
            </div>
        </content>
    </entry>
    <?r end ?>
</feed>