Skip to content

Commit

Permalink
Improve rss feed (#44)
Browse files Browse the repository at this point in the history
* Improve rss feed

* Fixes after code review
  • Loading branch information
janczer authored and veelenga committed Oct 2, 2017
1 parent 1d13836 commit c55897d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ TWITTER_ACCESS_TOKEN_SECRET

* [veelenga](https://github.com/veelenga) V. Elenhaupt - creator, maintainer
* [hugoabonizio](https://github.com/hugoabonizio) Hugo Abonizio - contributor, maintainer
* [janczer](https://github.com/janczer) Janczer - contributor
* [lex111](https://github.com/lex111) Alexey Pyltsyn - contributor
2 changes: 2 additions & 0 deletions src/controllers/rss_controller.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class RSSController < Amber::Controller::Base
include Helpers::TimeAgoHelper

def show
announcements = Announcement.newest

Expand Down
4 changes: 4 additions & 0 deletions src/views/rss/show.slang
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ rss version=2.0
item
title = announcement.title
description = announcement.content
| <small>#{announcement.typename}.</small>
| <small>Announced #{time_ago_in_words(announcement.created_at.not_nil!)} by </small>
- if user = announcement.user
| <a href="#{user.github_url}">#{user.login}</a>
pubDate = announcement.created_at.try &.to_s "%d %b %Y %T %z"
<link>#{SITE.url}/announcements/#{announcement.id}</link>
guid #{SITE.url}/announcements/#{announcement.id}

0 comments on commit c55897d

Please sign in to comment.