Change default RSS sort to 'new'.

This commit is contained in:
TLSM 2022-09-12 07:59:38 -04:00 committed by Ben Rog-Wilhelm
parent d8462a4a32
commit ccabc8b881
3 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ from files.__main__ import app
@app.get('/rss')
@app.get('/feed')
@app.get('/rss/<sort>/<t>')
def feeds_front(sort='hot', t='all'):
def feeds_front(sort='new', t='all'):
try: page = max(int(request.values.get("page", 1)), 1)
except: page = 1

View file

@ -287,7 +287,7 @@ def front_all(v, sub=None, subdomain=None):
@cache.memoize(timeout=86400)
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false", filter_words='', gt=0, lt=0, sub=None, site=None):
def frontlist(v=None, sort='new', page=1, t="all", ids_only=True, ccmode="false", filter_words='', gt=0, lt=0, sub=None, site=None):
posts = g.db.query(Submission)

View file

@ -228,9 +228,9 @@
<div class="body w-lg-100">
<input autocomplete="off" type="text" readonly="" class="form-control copy-link" id="rss_feed" value="{{SITE_FULL}}/rss/hot/all" data-clipboard-text="{{SITE_FULL}}/rss/hot/all">
<input autocomplete="off" type="text" readonly="" class="form-control copy-link" id="rss_feed" value="{{SITE_FULL}}/rss/new/all" data-clipboard-text="{{SITE_FULL}}/rss/new/all">
<div class="text-small-extra text-muted mt-3">You can change the feed by replacing "hot" with whatever sorting you want and "all" with whatever time filter you want.</div>
<div class="text-small-extra text-muted mt-3">You can change the feed by replacing "new" with whatever sorting you want and "all" with whatever time filter you want.</div>
</div>