Support RSS for multi-timelines
This commit is contained in:
@@ -56,20 +56,24 @@
|
||||
#end for
|
||||
#end proc
|
||||
#
|
||||
#proc renderTimelineRss*(timeline: Timeline; profile: Profile; hostname: string): string =
|
||||
#proc renderTimelineRss*(timeline: Timeline; profile: Profile; hostname: string; multi=false): string =
|
||||
#let prefs = Prefs(replaceTwitter: hostname, replaceYoutube: "invidio.us")
|
||||
#result = ""
|
||||
#let user = (if multi: "" else: "@") & profile.username
|
||||
#var title = profile.fullname
|
||||
#if not multi: title &= " / " & user
|
||||
#end if
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
|
||||
<channel>
|
||||
<atom:link href="https://${hostname}/${profile.username}/rss" rel="self" type="application/rss+xml" />
|
||||
<title>${profile.fullname} / @${profile.username}</title>
|
||||
<title>${title}</title>
|
||||
<link>https://${hostname}/${profile.username}</link>
|
||||
<description>Twitter feed for: @${profile.username}. Generated by ${hostname}</description>
|
||||
<description>Twitter feed for: ${user}. Generated by ${hostname}</description>
|
||||
<language>en-us</language>
|
||||
<ttl>40</ttl>
|
||||
<image>
|
||||
<title>${profile.fullname} / @${profile.username}</title>
|
||||
<title>${title}</title>
|
||||
<link>https://${hostname}/${profile.username}</link>
|
||||
<url>https://${hostname}${getPicUrl(profile.getUserPic(style="_400x400"))}</url>
|
||||
<width>128</width>
|
||||
|
||||
Reference in New Issue
Block a user