Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit c61e2b1

Browse files
Resolved issue #288:
Added og:title, og:image, og:video, twitter:title, twitter:card metadata properties in order to add image of the last mint from a user and their username on open graph display cards.
1 parent f6db718 commit c61e2b1

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

dashboard/src/views/Profile.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
icon="ghost"
1010
></b-icon>
1111
<a :href="`https://kusama.subscan.io/account/${id}`" target="_blank"
12-
><Identity :address="id" :inline="true"
12+
><Identity ref="identity" :address="id" :inline="true"
1313
/></a>
1414
</p>
1515
<Sharing v-if="!sharingVisible" label="Check this awesome Profile on %23KusamaNetwork %23KodaDot" :iframe="iframeSettings" />
@@ -56,7 +56,22 @@ const components = {
5656
5757
const eq = (tab: string) => (el: string) => tab === el
5858
59-
@Component({ components })
59+
@Component<Profile>({
60+
components,
61+
metaInfo() {
62+
return {
63+
meta: [
64+
{ property: 'og:title', content: this.name },
65+
{ property: 'og:type', content: 'website'},
66+
{ property: 'og:image', vmid: 'og:image', content: this.firstNFT as string},
67+
{ property: 'og:video', vmid: 'og:video' , content: this.firstNFT as string },
68+
{ property: 'twitter:title', content: this.name },
69+
{ property: 'twitter:image', vmid: 'twitter:image', content: this.firstNFT as string },
70+
{ property: 'twitter:card', content: 'summary_large_image' },
71+
]
72+
};
73+
},
74+
})
6075
export default class Profile extends Vue {
6176
public activeTab: string = 'nft';
6277
protected id: string = '';
@@ -94,7 +109,6 @@ export default class Profile extends Vue {
94109
showNotification(`${e}`, notificationTypes.danger);
95110
console.warn(e);
96111
}
97-
98112
this.isLoading = false;
99113
this.name = ((this.$refs['identity'] as Identity).name as string);
100114
}

0 commit comments

Comments
 (0)