mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
Merge pull request #2674 from clarkdo/head_noscript
feat: add noscript in head
This commit is contained in:
commit
fcf99b1140
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user