mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 18:37:21 +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: [
|
meta: [
|
||||||
{ hid: 'description', name: 'description', content: 'Home page description' }
|
{ hid: 'description', name: 'description', content: 'Home page description' }
|
||||||
],
|
],
|
||||||
|
noscript: [
|
||||||
|
{ innerHTML: 'Body No Scripts', body: true }
|
||||||
|
],
|
||||||
script: [
|
script: [
|
||||||
{ src: '/head.js' },
|
{ src: '/head.js' },
|
||||||
// Supported since 1.0
|
// Supported since 1.0
|
||||||
|
@ -58,7 +58,7 @@ module.exports = class MetaRenderer {
|
|||||||
m.script.text() +
|
m.script.text() +
|
||||||
m.noscript.text()
|
m.noscript.text()
|
||||||
// BODY_SCRIPTS
|
// 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
|
// Resources Hints
|
||||||
meta.resourceHints = ''
|
meta.resourceHints = ''
|
||||||
// Resource Hints
|
// Resource Hints
|
||||||
|
@ -373,6 +373,7 @@ module.exports = class Renderer {
|
|||||||
APP += `<script type="text/javascript">${serializedSession}</script>`
|
APP += `<script type="text/javascript">${serializedSession}</script>`
|
||||||
APP += context.renderScripts()
|
APP += context.renderScripts()
|
||||||
APP += m.script.text({ body: true })
|
APP += m.script.text({ body: true })
|
||||||
|
APP += m.noscript.text({ body: true })
|
||||||
|
|
||||||
HEAD += context.renderStyles()
|
HEAD += context.renderStyles()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user