mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
🐛 Fixed Portal not appearing on 404 pages
closes: https://github.com/TryGhost/Ghost/issues/12413 - portal should be included if there is no context so that it appears on 404 pages - having this inside the if (context) block was an oversight - we want to chain the accent color style block, so we move this to the end to make that possible
This commit is contained in:
parent
fd0a4692c9
commit
5add79e3d5
@ -167,9 +167,29 @@ module.exports = function ghost_head(options) { // eslint-disable-line camelcase
|
||||
'\n </script>\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!_.includes(context, 'amp')) {
|
||||
head.push(getMembersHelper(options.data));
|
||||
head.push('<meta name="generator" content="Ghost ' +
|
||||
escapeExpression(safeVersion) + '" />');
|
||||
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="' +
|
||||
escapeExpression(meta.site.title) + '" href="' +
|
||||
escapeExpression(meta.rssUrl) + '" />');
|
||||
|
||||
// no code injection for amp context!!!
|
||||
if (!_.includes(context, 'amp')) {
|
||||
head.push(getMembersHelper(options.data));
|
||||
|
||||
if (!_.isEmpty(globalCodeinjection)) {
|
||||
head.push(globalCodeinjection);
|
||||
}
|
||||
|
||||
if (!_.isEmpty(postCodeInjection)) {
|
||||
head.push(postCodeInjection);
|
||||
}
|
||||
|
||||
if (!_.isEmpty(tagCodeInjection)) {
|
||||
head.push(tagCodeInjection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,27 +205,6 @@ module.exports = function ghost_head(options) { // eslint-disable-line camelcase
|
||||
}
|
||||
}
|
||||
|
||||
head.push('<meta name="generator" content="Ghost ' +
|
||||
escapeExpression(safeVersion) + '" />');
|
||||
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="' +
|
||||
escapeExpression(meta.site.title) + '" href="' +
|
||||
escapeExpression(meta.rssUrl) + '" />');
|
||||
|
||||
// no code injection for amp context!!!
|
||||
if (!_.includes(context, 'amp')) {
|
||||
if (!_.isEmpty(globalCodeinjection)) {
|
||||
head.push(globalCodeinjection);
|
||||
}
|
||||
|
||||
if (!_.isEmpty(postCodeInjection)) {
|
||||
head.push(postCodeInjection);
|
||||
}
|
||||
|
||||
if (!_.isEmpty(tagCodeInjection)) {
|
||||
head.push(tagCodeInjection);
|
||||
}
|
||||
}
|
||||
debug('end');
|
||||
return new SafeString(head.join('\n ').trim());
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user