Skip to content

Commit cea3fb5

Browse files
committed
Embed quote tweet in RSS
Fixes #132 Closes #820
1 parent 53edbbc commit cea3fb5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/views/rss.nimf

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#end proc
2626
#
2727
#proc getDescription(desc: string; cfg: Config): string =
28-
Twitter feed for: ${desc}. Generated by ${cfg.hostname}
28+
Twitter feed for: ${desc}. Generated by ${getUrlPrefix(cfg)}
2929
#end proc
3030
#
3131
#proc getTweetsWithPinned(profile: Profile): seq[Tweets] =
@@ -52,8 +52,18 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
5252
#let text = replaceUrls(tweet.text, defaultPrefs, absolute=urlPrefix)
5353
<p>${text.replace("\n", "<br>\n")}</p>
5454
#if tweet.quote.isSome and get(tweet.quote).available:
55-
# let quoteLink = getLink(get(tweet.quote))
56-
<p><a href="${urlPrefix}${quoteLink}">${cfg.hostname}${quoteLink}</a></p>
55+
# let quoteTweet = get(tweet.quote)
56+
# let quoteLink = urlPrefix & getLink(quoteTweet)
57+
<hr/>
58+
<blockquote>
59+
<b>${quoteTweet.user.fullname} (@${quoteTweet.user.username})</b>
60+
<p>
61+
${renderRssTweet(quoteTweet, cfg)}
62+
</p>
63+
<footer>
64+
— <cite><a href="${quoteLink}">${quoteLink}</a>
65+
</footer>
66+
</blockquote>
5767
#end if
5868
#if tweet.photos.len > 0:
5969
# for photo in tweet.photos:

0 commit comments

Comments
 (0)