Skip to content

Commit

Permalink
Fix StructuredData issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rkalis committed May 2, 2024
1 parent 937f8cf commit b5646e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
10 changes: 6 additions & 4 deletions app/[locale]/blog/[...slug]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ const BlogLayout = async ({ params, children }: Props) => {
return (
<>
<div vocab="https://schema.org/" typeof="Article">
<meta property="headline" content={meta.title} />
<div hidden className="hidden" property="headline" content={meta.title} />
{meta.author && (
<div property="author" typeof="Person">
<meta property="name" content={meta.author.name} />
<div hidden className="hidden" property="name" content={meta.author.name} />
</div>
)}
<meta property="datePublished" content={meta.date} />
{meta.coverImage && <meta property="image" content={`https://revoke.cash${meta.coverImage}`} />}
<div hidden className="hidden" property="datePublished" content={meta.date} />
{meta.coverImage && (
<div hidden className="hidden" property="image" content={`https://revoke.cash${meta.coverImage}`} />
)}
</div>
<div className="max-w-3xl mx-auto">
<div className="pl-2 pt-2">
Expand Down
6 changes: 4 additions & 2 deletions app/[locale]/learn/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ const LearnDocumentPage: NextPage<Props> = async ({ params }) => {
return (
<>
<div vocab="https://schema.org/" typeof="Article">
<meta property="headline" content={meta.title} />
{meta.coverImage && <meta property="image" content={`https://revoke.cash${meta.coverImage}`} />}
<div hidden className="hidden" property="headline" content={meta.title} />
{meta.coverImage && (
<div hidden className="hidden" property="image" content={`https://revoke.cash${meta.coverImage}`} />
)}
</div>
<LearnLayout sidebarEntries={sidebar} slug={params.slug} meta={meta} translationUrl={translationUrl}>
<MarkdownProse content={content} />
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/learn/wallets/add-network/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const AddNewChainPage: NextPage<Props> = async ({ params }) => {
<Prose vocab="https://schema.org/" typeof="HowTo">
<h1 property="name">{meta.title}</h1>
<Divider className="my-4" />
<meta property="description" content={meta.description} />
<div hidden className="hidden" property="description" content={meta.description} />
<div className="flex flex-col sm:flex-row items-center gap-2 my-4">
<p className="m-0">{t('learn.add_network.select_network')}</p>
<div className="not-prose shrink-0">
Expand All @@ -71,7 +71,7 @@ const AddNewChainPage: NextPage<Props> = async ({ params }) => {
<p>{t('learn.add_network.intro_paragraph', { chainName })}</p>
<div property="step" typeof="HowToStep">
<h3 property="name">{t('learn.add_network.step_1.title')}</h3>
<meta property="text" content={t('learn.add_network.step_1.title')} />
<div hidden className="hidden" property="text" content={t('learn.add_network.step_1.title')} />
<div className="flex flex-col sm:flex-row gap-x-4 max-sm:max-w-sm">
<p>
<Image
Expand Down
2 changes: 1 addition & 1 deletion components/common/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Breadcrumb = ({ pages }: Props) => {
<span property="name">{page.name}</span>
</span>
)}
<meta property="position" content={String(i + 1)} />
<div hidden className="hidden" property="position" content={String(i + 1)} />
</li>
))}
</ol>
Expand Down

0 comments on commit b5646e7

Please sign in to comment.