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