diff --git a/nuxt.config.js b/nuxt.config.js index 04d39ee3..940e63a2 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -15,14 +15,14 @@ const { export default { // Global page headers: https://go.nuxtjs.dev/config-head head: { - title: 'Writing NFT - Decentralized Publishing - LikeCoin', + title: 'LikeCoin Creator Portal - LikeCoin', meta: [ { charset: 'utf-8' }, { hid: 'viewport', name: 'viewport', content: 'width=device-width' }, { hid: 'description', name: 'description', content: siteDefaultDescription }, { hid: 'theme-color', name: 'theme-color', content: '#28646e' }, - { hid: 'og:site_name', property: 'og:site_name', content: 'Writing NFT - Decentralized Publishing - LikeCoin'}, - { hid: 'og:title', property: 'og:title', content: 'Writing NFT - Decentralized Publishing - LikeCoin' }, + { hid: 'og:site_name', property: 'og:site_name', content: 'LikeCoin Creator Portal - LikeCoin'}, + { hid: 'og:title', property: 'og:title', content: 'LikeCoin Creator Portal - LikeCoin' }, { hid: 'og:image', property: 'og:image', content: 'https://app.like.co/images/og/default.png' }, { hid: 'og:description', property: 'og:description', content: siteDefaultDescription }, { hid: 'og:image_alt', property: 'og:image:alt', content: '#DePub' }, @@ -36,6 +36,26 @@ export default { { rel: 'preload', href: 'https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=PT+Mono&display=swap', as: 'style' }, { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=PT+Mono&display=swap' }, ], + script: [{ + hid: 'schema', + innerHTML: JSON.stringify([ + { + '@context': 'https://schema.org', + '@type': 'WebSite', + name: 'LikeCoin Creator Portal', + url: 'https://app.like.co/', + }, + { + '@context': 'http://www.schema.org', + '@type': 'Project', + name: 'LikeCoin', + url: 'https://like.co', + logo: 'https://like.co/logo.png', + }, + ]), + type: 'application/ld+json', + }], + __dangerouslyDisableSanitizersByTagID: { schema: ['innerHTML'] }, }, env: { diff --git a/pages/view/_iscnId/index.vue b/pages/view/_iscnId/index.vue index c764918a..f84cb4b9 100644 --- a/pages/view/_iscnId/index.vue +++ b/pages/view/_iscnId/index.vue @@ -503,6 +503,7 @@ import { ISCN_TX_RAW_DATA_ENDPOINTS, WALLET_TYPE_REPLACER, IPFS_VIEW_GATEWAY_URL, + LIKER_LAND_URL, } from '~/constant' const iscnModule = namespace('iscn') @@ -534,6 +535,19 @@ export enum ExifList { } const description = (this as ViewIscnIdPage).metadata?.description || this.$t('page.iscnId.default.description') + const iscnOwner = (this as ViewIscnIdPage).owner; + const iscnOwnerPerson =iscnOwner + ? { + '@context': 'http://www.schema.org', + '@type': 'Person', + url: `${LIKER_LAND_URL}/${iscnOwner}`, + identifier: iscnOwner, + } + : undefined; + const schema = { + ...(this as ViewIscnIdPage).metadata, + author: iscnOwnerPerson, + }; return { title, meta: [ @@ -553,6 +567,14 @@ export enum ExifList { content: description, }, ], + script: schema ? [ + { + hid: 'schema', + innerHTML: JSON.stringify(schema), + type: 'application/ld+json', + body: true, + }, + ] : undefined, } as MetaInfo }, filters: { ellipsis },