diff options
| author | Pitu <[email protected]> | 2021-01-21 01:14:43 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2021-01-21 01:14:43 +0900 |
| commit | f2ac2da64234ba30470552da8e2a64bde244181c (patch) | |
| tree | 483b7783bc6fb5de6bb258849c6b18b4c8977c39 | |
| parent | Merge pull request #254 from WeebDev/feature/ssr (diff) | |
| download | host.fuwn.me-f2ac2da64234ba30470552da8e2a64bde244181c.tar.xz host.fuwn.me-f2ac2da64234ba30470552da8e2a64bde244181c.zip | |
fix: potentially fix meta embeds
| -rw-r--r-- | src/site/pages/a/_identifier.vue | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/site/pages/a/_identifier.vue b/src/site/pages/a/_identifier.vue index 0fc2103..6aecde6 100644 --- a/src/site/pages/a/_identifier.vue +++ b/src/site/pages/a/_identifier.vue @@ -76,7 +76,7 @@ import { mapGetters } from 'vuex'; import axios from 'axios'; import Grid from '~/components/grid/Grid.vue'; - +import logo from '~/assets/images/logo.png'; export default { components: { Grid }, data() { @@ -146,25 +146,27 @@ export default { }, head() { if (this.files) { - const image = this.isNsfw ? '/public/images/share.jpg' : this.files.length ? this.files[0].thumbSquare : '/public/images/share.jpg'; + const image = this.isNsfw ? logo : this.files.length ? this.files[0].thumbSquare : logo; const title = this.name ? this.isNsfw ? `[NSFW] ${this.name}` : this.name : ''; return { title, meta: [ - { vmid: 'twitter:title', name: 'twitter:title', content: `${title} | Files: ${this.totalFiles}` }, - { vmid: 'twitter:image', name: 'twitter:image', content: image }, - { vmid: 'twitter:image:src', name: 'twitter:image:src', value: image }, - { vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` }, - { vmid: 'og:title', property: 'og:title', content: `${title} | Files: ${this.totalFiles}` }, - { vmid: 'og:image', property: 'og:image', content: image }, - { vmid: 'og:image:secure_url', property: 'og:image:secure_url', content: image } + { hid: 'twitter:card', name: 'twitter:card', content: 'summary' }, + { hid: 'twitter:title', name: 'twitter:title', content: title }, + { 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: '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 }, + { hid: 'og:image:secure_url', property: 'og:image:secure_url', content: image } ] }; } return { title: `${this.name ? this.name : ''}`, meta: [ - { vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` } + { hid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` } ] }; } |