feat: add noscript in head

This commit is contained in:
Clark Du 2018-01-23 18:30:36 +08:00
parent a6caff9d29
commit 8b634c210d
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
3 changed files with 6 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,8 @@ 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()