From d83462c0756b782926ccd8fcaa1484de88e6b456 Mon Sep 17 00:00:00 2001 From: Moritz Ruth Date: Sat, 11 Apr 2020 00:44:54 +0200 Subject: [PATCH] Set title on every page --- nuxt.config.js | 1 + pages/index.vue | 1 + pages/legal-notice.vue | 14 ++++++++++---- pages/privacy-policy.vue | 5 ++++- pages/projects.vue | 3 ++- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index ecdc211..d48c2de 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -6,6 +6,7 @@ export default { ** Headers of the page */ head: { + titleTemplate: "%s | Moritz Ruth", link: [ { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }, { rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Alata&display=swap" } diff --git a/pages/index.vue b/pages/index.vue index bda97c8..cacbf24 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -199,6 +199,7 @@ export default { name: "IndexPage", layout: "empty", + head: () => ({ title: "Moritz Ruth", titleTemplate: "%s" }), components: { NavigationBar, AnimatedLogo, InstagramIcon, TwitterIcon, NPMIcon, GitHubIcon, EmailIcon }, mounted() { let configIndex = 0; diff --git a/pages/legal-notice.vue b/pages/legal-notice.vue index b388ac7..baa43fc 100644 --- a/pages/legal-notice.vue +++ b/pages/legal-notice.vue @@ -1,8 +1,9 @@ diff --git a/pages/privacy-policy.vue b/pages/privacy-policy.vue index 69b24b8..65b3c9a 100644 --- a/pages/privacy-policy.vue +++ b/pages/privacy-policy.vue @@ -290,6 +290,9 @@ export default { name: "PrivacyPolicyPage", components: { NavigationBar, ExternalLink }, - head: () => ({ htmlAttrs: { lang: "de" } }) + head: () => ({ + htmlAttrs: { lang: "de" }, + title: "Privacy Policy" + }) }; diff --git a/pages/projects.vue b/pages/projects.vue index 3501195..5bd5f00 100644 --- a/pages/projects.vue +++ b/pages/projects.vue @@ -71,6 +71,7 @@ export default { name: "ProjectsPage", - components: { MyProject, NavigationBar } + components: { MyProject, NavigationBar }, + head: () => ({ title: "Projects" }) };