Skip to content

Commit

Permalink
fix(meta): move noscript and add title template
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow81627 committed Dec 3, 2019
1 parent da56396 commit 7715a2a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ module.exports = {
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
titleTemplate: (titleChunk) => {
// If undefined or blank then we don't need the hyphen
return titleChunk ? `${titleChunk} - Daim` : 'Daim';
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
Expand All @@ -48,9 +51,21 @@ module.exports = {
name: 'description',
content: process.env.npm_package_description || '',
},
{ innerHTML: 'This website requires JavaScript.' },
{
property: 'og:title',
template: (titleChunk) => {
// If undefined or blank then we don't need the hyphen
return titleChunk ? `${titleChunk} - Daim` : 'Daim';
},
vmid: 'og:title',
},
{
name: 'version',
content: pkg.version,
},
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
noscript: [{ innerHTML: 'This website requires JavaScript.' }],
},

/*
Expand Down

1 comment on commit 7715a2a

@vercel
Copy link

@vercel vercel bot commented on 7715a2a Dec 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.