From 3eec8194d044d798ed65380f36cf665bad48bae6 Mon Sep 17 00:00:00 2001 From: Om Gupta Date: Tue, 8 Oct 2024 18:15:08 +0530 Subject: [PATCH] Schema Block added --- blocks/schema-tag/schema-tag.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/blocks/schema-tag/schema-tag.js b/blocks/schema-tag/schema-tag.js index 547f307983..b1dd606a8a 100644 --- a/blocks/schema-tag/schema-tag.js +++ b/blocks/schema-tag/schema-tag.js @@ -1,3 +1,30 @@ export default function decorate(block) { - document.head.append(block); + // document.head += (block.textContent); + + // const schema = { + // "@context": "https://schema.org", + // "@type": "Organization", + // "name": "Apply for a Home loan online with Piramal Finance 1 ", + // "url": "https://www.piramalfinance.com/", + // "logo": "/", + // "contactPoint": { + // "@type": "ContactPoint", + // "telephone": "1800-266-9777", + // "contactType": "customer service", + // "areaServed": "IN", + // "availableLanguage": "en" + // }, + // "sameAs": [ + // "https://www.facebook.com/pf", + // "https://twitter.com/pf", + // "https://www.instagram.com/pf/", + // "https://www.youtube.com/pfInsurance", + // "https://www.linkedin.com/company/pf" + // ] + // } + const script = document.createElement('script') + script.type = "application/ld+json"; + script.innerHTML = block.textContent; + block.innerHTML = ''; + document.head.append(script) } \ No newline at end of file