From ed2e15483c5dd80834d4d5c0c38a60a1a88edb65 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Wed, 30 Dec 2020 12:45:16 -0600 Subject: [PATCH] Add meta for index page --- pages/index.vue | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/pages/index.vue b/pages/index.vue index b1b96c2..22c79a6 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -168,6 +168,12 @@ export default { } }, computed: { + title () { + return `Apple Silicon and Apple M1 app and game compatibility list` + }, + description () { + return `List of compatibility apps and games for Apple Silicon and the Apple M1 including performance reports and benchmarks` + }, allList () { return [ ...this.initialAppList, @@ -219,6 +225,35 @@ export default { return } + }, + head() { + return { + title: this.title, + meta: [ + // hid is used as unique identifier. Do not use `vmid` for it as it will not work + { + 'hid': 'description', + 'name': 'description', + 'content': this.description + }, + + // Twitter Card + { + 'hid': 'twitter:title', + 'property': 'twitter:title', + 'content': this.title + }, + { + 'hid': 'twitter:description', + 'property': 'twitter:description', + 'content': this.description + }, + { + 'property': 'twitter:url', + 'content': `${process.env.URL}${this.$nuxt.$route.path}` + }, + ] + } } }