Skip to content

Instantly share code, notes, and snippets.

@iRbouh
Last active April 8, 2022 21:11
Show Gist options
  • Save iRbouh/674c58801268a07ecc5b48d9beb5078f to your computer and use it in GitHub Desktop.
Save iRbouh/674c58801268a07ecc5b48d9beb5078f to your computer and use it in GitHub Desktop.
JSON-LD Dynamic Markup
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
var el = document.createElement('script');
el.type = 'application/ld+json';
el.text = JSON.stringify({
"@context": "http://schema.org/",
"@type": "Person",
"name": "Im Dynamic",
"jobTitle": "Dynamic JOB",
"telephone": "(425) 123-4567",
"url": "http://www.dynamic.com"
});
document.querySelector('body').appendChild(el);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment