Skip to content

Commit

Permalink
Fix schemaOrg script (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
bklaing2 authored Jun 4, 2024
1 parent d48793d commit fc2a2fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/app/doi.org/[...doi]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Suspense } from 'react'
import { Metadata } from 'next'
import { redirect, notFound } from 'next/navigation'
import Script from 'next/script'
import truncate from 'lodash/truncate'

import { rorFromUrl, isProject, isDMP } from 'src/utils/helpers'
Expand Down Expand Up @@ -84,9 +85,6 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
// : metadata.work.types.resourceTypeGeneral?.toLowerCase() || undefined


// <script type="application/ld+json">{work.schemaOrg}</script>


return {
title: title,
description: description,
Expand Down Expand Up @@ -153,6 +151,7 @@ export default async function Page({ params, searchParams }: Props) {
<Content variables={variables} isBot={JSON.parse(isBot)} />
</Suspense>
<RelatedContent variables={variables} showSankey={showSankey} connectionType={connectionType} isBot={JSON.parse(isBot)} />
<Script type="application/ld+json" id="schemaOrg">{data.work.schemaOrg}</Script>
</>
}

Expand Down
2 changes: 0 additions & 2 deletions src/app/orcid.org/[orcid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
// : metadata.work.types.resourceTypeGeneral?.toLowerCase() || undefined


// <script type="application/ld+json">{work.schemaOrg}</script>


return {
title: title,
Expand Down

0 comments on commit fc2a2fc

Please sign in to comment.