Fix want-my-rss detection

This commit is contained in:
Zed 2019-09-15 12:57:44 +02:00
parent 36484c73fd
commit 6237460f77
3 changed files with 5 additions and 4 deletions

View File

@ -10,6 +10,7 @@ Inspired by the [invidio.us](https://github.com/omarroth/invidious) project.
- AGPLv3 licensed, no proprietary instances permitted - AGPLv3 licensed, no proprietary instances permitted
- Dark theme - Dark theme
- Lightweight (for [@nim_lang](https://twitter.com/nim_lang), 36KB vs 580KB from twitter.com) - Lightweight (for [@nim_lang](https://twitter.com/nim_lang), 36KB vs 580KB from twitter.com)
- Native RSS feeds
## Installation ## Installation

View File

@ -3,14 +3,11 @@ import asyncdispatch, strutils
import jester import jester
import router_utils, timeline import router_utils, timeline
import ".."/[types, utils, cache, agents, search] import ".."/[cache, agents, search]
import ../views/general import ../views/general
include "../views/rss.nimf" include "../views/rss.nimf"
export uri
export cache, search, agents
proc showRss*(name: string; query: Option[Query]): Future[string] {.async.} = proc showRss*(name: string; query: Option[Query]): Future[string] {.async.} =
let (profile, timeline, _) = await fetchSingleTimeline(name, "", getAgent(), query) let (profile, timeline, _) = await fetchSingleTimeline(name, "", getAgent(), query)
return renderTimelineRss(timeline.content, profile) return renderTimelineRss(timeline.content, profile)

View File

@ -26,6 +26,9 @@ proc renderMain*(body: VNode; prefs: Prefs; title="Nitter"; titleText=""; desc="
link(rel="stylesheet", `type`="text/css", href="/css/style.css") link(rel="stylesheet", `type`="text/css", href="/css/style.css")
link(rel="stylesheet", `type`="text/css", href="/css/fontello.css") link(rel="stylesheet", `type`="text/css", href="/css/fontello.css")
if rss.len > 0:
link(rel="alternate", `type`="application/rss+xml", href=rss, title="RSS feed")
if prefs.hlsPlayback: if prefs.hlsPlayback:
script(src="/js/hls.light.min.js") script(src="/js/hls.light.min.js")
script(src="/js/hlsPlayback.js") script(src="/js/hlsPlayback.js")