mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
818085f18c
fixes #4555 - There's no easy way to declare an XSL with the node xml module, so I needed to move the declarations to both be strings - Ideally the code to serve the XSL would also be inside the sitemap module, but I think we need to refactor a bit to get there easily - Added the XSL from #4559, with minor amends to make the tables and urls display correctly
13 lines
381 B
JavaScript
13 lines
381 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;
|