From ba409ef2fcf028be95b27bf94fd24e1295888d07 Mon Sep 17 00:00:00 2001 From: Pitu Date: Thu, 21 Jan 2021 01:35:04 +0900 Subject: chore: update metadata --- nuxt.config.js | 7 +++---- src/site/pages/a/_identifier.vue | 5 ++++- src/site/static/logo.png | Bin 0 -> 11306 bytes 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 src/site/static/logo.png diff --git a/nuxt.config.js b/nuxt.config.js index 80fbb4f..e875717 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -37,19 +37,18 @@ export default { content: `${process.env.SERVICE_NAME}` }, { hid: 'application-name', name: 'application-name', content: `${process.env.SERVICE_NAME}` }, - // { hid: 'msapplication-config', name: 'msapplication-config', content: `${process.env.DOMAIN}/browserconfig.xml` }, { hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' }, { hid: 'twitter:site', name: 'twitter:site', content: `${process.env.META_TWITTER_HANDLE}` }, { hid: 'twitter:creator', name: 'twitter:creator', content: `${process.env.META_TWITTER_HANDLE}` }, { hid: 'twitter:title', name: 'twitter:title', content: `${process.env.SERVICE_NAME}` }, { hid: 'twitter:description', name: 'twitter:description', content: `${process.env.META_DESCRIPTION}` }, - { hid: 'twitter:image', name: 'twitter:image', content: `${process.env.DOMAIN}/share.jpg` }, + { hid: 'twitter:image', name: 'twitter:image', content: `${process.env.DOMAIN}/logo.png` }, { hid: 'og:url', property: 'og:url', content: `${process.env.DOMAIN}` }, { hid: 'og:type', property: 'og:type', content: 'website' }, { hid: 'og:title', property: 'og:title', content: `${process.env.SERVICE_NAME}` }, { hid: 'og:description', property: 'og:description', content: `${process.env.META_DESCRIPTION}` }, - { hid: 'og:image', property: 'og:image', content: `${process.env.DOMAIN}/share.jpg` }, - { hid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${process.env.DOMAIN}/share.jpg` }, + { hid: 'og:image', property: 'og:image', content: `${process.env.DOMAIN}/logo.png` }, + { hid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${process.env.DOMAIN}/logo.png` }, { hid: 'og:site_name', property: 'og:site_name', content: `${process.env.SERVICE_NAME}` } ], link: [ diff --git a/src/site/pages/a/_identifier.vue b/src/site/pages/a/_identifier.vue index 6aecde6..d9abf0a 100644 --- a/src/site/pages/a/_identifier.vue +++ b/src/site/pages/a/_identifier.vue @@ -146,8 +146,9 @@ export default { }, head() { if (this.files) { - const image = this.isNsfw ? logo : this.files.length ? this.files[0].thumbSquare : logo; + const image = this.isNsfw ? logo : this.files.length ? this.files[0].url : logo; const title = this.name ? this.isNsfw ? `[NSFW] ${this.name}` : this.name : ''; + const description = `Files: ${this.totalFiles}`; return { title, meta: [ @@ -156,6 +157,8 @@ export default { { hid: 'twitter:image', name: 'twitter:image', content: image }, { hid: 'twitter:label1', name: 'twitter:label1', value: 'Files' }, { hid: 'twitter:data1', name: 'twitter:data1', value: this.totalFiles }, + { hid: 'twitter:description', name: 'twitter:description', content: description }, + { hid: 'og:description', property: 'og:description', content: description }, { hid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` }, { hid: 'og:title', property: 'og:title', content: title }, { hid: 'og:image', property: 'og:image', content: image }, diff --git a/src/site/static/logo.png b/src/site/static/logo.png new file mode 100644 index 0000000..f72de04 Binary files /dev/null and b/src/site/static/logo.png differ -- cgit v1.2.3