matthiasportzel.com/patches/projects-ideas-rss.patch

33 lines
1.2 KiB
Diff

diff --git a/ghost/core/core/frontend/meta/rss-url.js b/ghost/core/core/frontend/meta/rss-url.js
index 5d4bc5092b..2e279b0f90 100644
--- a/ghost/core/core/frontend/meta/rss-url.js
+++ b/ghost/core/core/frontend/meta/rss-url.js
@@ -3,7 +3,7 @@ const routingService = require('../services/routing');
function getRssUrl(data, absolute) {
return routingService.registry.getRssUrl({
absolute: absolute
- });
+ }, data);
}
module.exports = getRssUrl;
diff --git a/ghost/core/core/frontend/services/routing/registry.js b/ghost/core/core/frontend/services/routing/registry.js
index c71c6840b6..bf6f03048f 100644
--- a/ghost/core/core/frontend/services/routing/registry.js
+++ b/ghost/core/core/frontend/services/routing/registry.js
@@ -73,9 +73,13 @@ module.exports = {
* @param {Object} options
* @returns {String}
*/
- getRssUrl(options) {
+ getRssUrl(options, data) {
let rssUrl = null;
+ if (data && (data.relativeUrl === "/projects/" || data.relativeUrl === "/ideas/")) {
+ return data.relativeUrl + "rss";
+ }
+
const collectionIndexRouter = _.find(routers, {name: 'CollectionRouter', routerName: 'index'});
if (collectionIndexRouter) {