mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Use software version in RSS
closes #723 Still waiting on https://github.com/dylang/node-rss/pull/16 to get this to actually output
This commit is contained in:
parent
406c6d0dea
commit
486c2b4eea
1 changed files with 7 additions and 3 deletions
|
@ -69,7 +69,7 @@ frontendControllers = {
|
|||
feed = new RSS({
|
||||
title: ghost.settings().title,
|
||||
description: ghost.settings().description,
|
||||
generator: 'Ghost v' + ghost.settings().currentVersion,
|
||||
generator: 'Ghost v' + res.locals.version,
|
||||
author: ghost.settings().author,
|
||||
feed_url: siteUrl + '/rss/',
|
||||
site_url: siteUrl,
|
||||
|
@ -79,8 +79,12 @@ frontendControllers = {
|
|||
pageParam = req.params.page !== undefined ? parseInt(req.params.page, 10) : 1;
|
||||
|
||||
// No negative pages
|
||||
if (pageParam < 1) {
|
||||
return res.redirect("/rss/1/");
|
||||
if (isNaN(pageParam) || pageParam < 1) {
|
||||
return res.redirect("/rss/");
|
||||
}
|
||||
|
||||
if (pageParam === 1 && req.route.path === '/rss/:page/') {
|
||||
return res.redirect('/rss/');
|
||||
}
|
||||
|
||||
api.posts.browse({page: pageParam}).then(function (page) {
|
||||
|
|
Loading…
Reference in a new issue