Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit c55897d

Browse files
janczerveelenga
authored andcommitted
Improve rss feed (#44)
* Improve rss feed * Fixes after code review
1 parent 1d13836 commit c55897d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ TWITTER_ACCESS_TOKEN_SECRET
7777

7878
* [veelenga](https://github.com/veelenga) V. Elenhaupt - creator, maintainer
7979
* [hugoabonizio](https://github.com/hugoabonizio) Hugo Abonizio - contributor, maintainer
80+
* [janczer](https://github.com/janczer) Janczer - contributor
8081
* [lex111](https://github.com/lex111) Alexey Pyltsyn - contributor

src/controllers/rss_controller.cr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class RSSController < Amber::Controller::Base
2+
include Helpers::TimeAgoHelper
3+
24
def show
35
announcements = Announcement.newest
46

src/views/rss/show.slang

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ rss version=2.0
88
item
99
title = announcement.title
1010
description = announcement.content
11+
| <small>#{announcement.typename}.</small>
12+
| <small>Announced #{time_ago_in_words(announcement.created_at.not_nil!)} by </small>
13+
- if user = announcement.user
14+
| <a href="#{user.github_url}">#{user.login}</a>
1115
pubDate = announcement.created_at.try &.to_s "%d %b %Y %T %z"
1216
<link>#{SITE.url}/announcements/#{announcement.id}</link>
1317
guid #{SITE.url}/announcements/#{announcement.id}

0 commit comments

Comments
 (0)