Merge pull request #604 from jgable/fixRssLink

Fix RSS urls
This commit is contained in:
Hannah Wolfe 2013-09-02 07:41:56 -07:00
commit 4d4d4ac0e6
2 changed files with 15 additions and 12 deletions

View File

@ -18,6 +18,9 @@ config.activePlugins = [
'FancyFirstChar'
];
// The url to use when providing links to the site; like RSS and email.
config.siteUrl = 'http://127.0.0.1';
// ## Default Navigation Items
// Add new objects here to extend the menu output by {{nav}}
config.nav = [

View File

@ -50,17 +50,17 @@ frontendControllers = {
},
'rss': function (req, res) {
// Initialize RSS
var feed = new RSS({
title: ghost.settings().title,
description: ghost.settings().description,
generator: 'Ghost v' + ghost.settings().currentVersion,
author: ghost.settings().author,
feed_url: ghost.settings().url + '/rss/',
site_url: ghost.settings().url,
ttl: '60'
}),
// Parse the page number
var siteUrl = ghost.config().siteUrl,
feed = new RSS({
title: ghost.settings().title,
description: ghost.settings().description,
generator: 'Ghost v' + ghost.settings().currentVersion,
author: ghost.settings().author,
feed_url: siteUrl + '/rss/',
site_url: siteUrl,
ttl: '60'
}),
// Parse the page number
pageParam = req.params.page !== undefined ? parseInt(req.params.page, 10) : 1;
// No negative pages
@ -87,7 +87,7 @@ frontendControllers = {
var item = {
title: post.title,
guid: post.uuid,
url: ghost.settings().url + '/' + post.slug + '/',
url: siteUrl + '/' + post.slug + '/',
date: post.published_at
};