mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-06-28 23:40:21 +08:00
refactor(web): move gallery schema to inline script
This commit is contained in:
parent
2f82c53b28
commit
e9a4880908
@ -41,7 +41,12 @@ export const dynamic = "force-static"
|
||||
export default async function IconsPage() {
|
||||
const icons = await getIconsArray()
|
||||
|
||||
const gallerySchema = {
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
id="gallery-schema"
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify({
|
||||
"@context": "https://schema.org",
|
||||
"@type": "ImageGallery",
|
||||
"name": `${SITE_NAME} - Browse ${icons.length} Icons - ${SITE_TAGLINE}`,
|
||||
@ -53,14 +58,7 @@ export default async function IconsPage() {
|
||||
"name": ORGANIZATION_NAME,
|
||||
"url": GITHUB_URL
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
id="gallery-schema"
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(gallerySchema) }}
|
||||
}) }}
|
||||
/>
|
||||
<script
|
||||
id="org-schema"
|
||||
|
Loading…
x
Reference in New Issue
Block a user