Merge pull request #2674 from clarkdo/head_noscript

feat: add noscript in head
This commit is contained in:
Sébastien Chopin 2018-01-23 11:43:25 +01:00 committed by GitHub
commit fcf99b1140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,9 @@ export default {
meta: [
{ hid: 'description', name: 'description', content: 'Home page description' }
],
noscript: [
{ innerHTML: 'Body No Scripts', body: true }
],
script: [
{ src: '/head.js' },
// Supported since 1.0

View File

@ -58,7 +58,7 @@ module.exports = class MetaRenderer {
m.script.text() +
m.noscript.text()
// BODY_SCRIPTS
meta.BODY_SCRIPTS = m.script.text({ body: true })
meta.BODY_SCRIPTS = m.script.text({ body: true }) + m.noscript.text({ body: true })
// Resources Hints
meta.resourceHints = ''
// Resource Hints

View File

@ -373,6 +373,7 @@ module.exports = class Renderer {
APP += `<script type="text/javascript">${serializedSession}</script>`
APP += context.renderScripts()
APP += m.script.text({ body: true })
APP += m.noscript.text({ body: true })
HEAD += context.renderStyles()