mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
196bbfce18
fixes #5104, refs #4348, #2263 - Create a centralised event module - Hook it up for posts, pages, tags and users - Use it in sitemaps instead of direct method calls - Use it for xmlrpc calls - Check events are fired in model tests - Update sitemap tests to work with new code - Fix a bug where invited users were appearing in sitemaps - Move sitemaps and xmlrpc into a directory together
14 lines
384 B
JavaScript
14 lines
384 B
JavaScript
var config = require('../../../config'),
|
|
utils;
|
|
|
|
utils = {
|
|
getDeclarations: function () {
|
|
var baseUrl = config.urlFor('sitemap-xsl');
|
|
baseUrl = baseUrl.replace(/^(http:|https:)/, '');
|
|
return '<?xml version="1.0" encoding="UTF-8"?>' +
|
|
'<?xml-stylesheet type="text/xsl" href="' + baseUrl + 'sitemap.xsl"?>';
|
|
}
|
|
};
|
|
|
|
module.exports = utils;
|