Skip to content

Commit

Permalink
Schema Block added
Browse files Browse the repository at this point in the history
  • Loading branch information
omprakashgupta1995 committed Oct 8, 2024
1 parent d030680 commit 3eec819
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion blocks/schema-tag/schema-tag.js
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 3eec819

Please sign in to comment.