Parameterize page titles

This commit is contained in:
roschaefer 2020-06-16 14:31:29 +02:00
parent 650b3cef43
commit 906ab2d790
2 changed files with 5 additions and 6 deletions

View File

@ -8,7 +8,7 @@ export default {
manifest, manifest,
head: { head: {
title: 'Human Connection', title: manifest.name,
meta: [ meta: [
{ {
charset: 'utf-8', charset: 'utf-8',
@ -20,7 +20,7 @@ export default {
{ {
hid: 'description', hid: 'description',
name: 'description', name: 'description',
content: 'Maintenance page for Human Connection', content: `Maintenance page for ${manifest.name}`,
}, },
], ],
link: [ link: [

View File

@ -1,10 +1,9 @@
import path from 'path' import path from 'path'
import dotenv from 'dotenv' import dotenv from 'dotenv'
import manifest from './constants/manifest.js'
dotenv.config() // we want to synchronize @nuxt-dotenv and nuxt-env dotenv.config() // we want to synchronize @nuxt-dotenv and nuxt-env
const manifest = require('./constants/manifest.js')
const pkg = require('./package') const pkg = require('./package')
export const envWhitelist = [ export const envWhitelist = [
'NODE_ENV', 'NODE_ENV',
@ -68,8 +67,8 @@ export default {
** Headers of the page ** Headers of the page
*/ */
head: { head: {
title: 'Human Connection', title: manifest.name,
titleTemplate: '%s - Human Connection', titleTemplate: `%s - ${manifest.name}`,
meta: [ meta: [
{ {
charset: 'utf-8', charset: 'utf-8',