mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
2700bfa4cc
refs #1833 - Refactor url generation to use a base urlJoin method - urlJoin handles slash de-duping and subdir de-duping - fixes sitemap xml option
13 lines
379 B
JavaScript
13 lines
379 B
JavaScript
var config = require('../../../config'),
|
|
utils;
|
|
|
|
utils = {
|
|
getDeclarations: function () {
|
|
var baseUrl = config.urlFor('sitemap_xsl', true);
|
|
baseUrl = baseUrl.replace(/^(http:|https:)/, '');
|
|
return '<?xml version="1.0" encoding="UTF-8"?>' +
|
|
'<?xml-stylesheet type="text/xsl" href="' + baseUrl + '"?>';
|
|
}
|
|
};
|
|
|
|
module.exports = utils;
|