Skip to content

Instantly share code, notes, and snippets.

@patrickcoombe
Created October 3, 2019 06:59
Show Gist options
  • Save patrickcoombe/6c4a1e7898e06bba66edf9f6ad75513d to your computer and use it in GitHub Desktop.
Save patrickcoombe/6c4a1e7898e06bba66edf9f6ad75513d to your computer and use it in GitHub Desktop.
Web Site
// two examples
// simple
// and with search
<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "My Website Name",
"url": "https://example.com",
}</script>
// next eg for use on sites with internal search
<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "Site name",
"url": "https://example.com",
"sameAs": ["https://facebook.com/mypage",
"https://instagram.com/site",
"https://twitter.com/name"],
"potentialAction": {
"@type": "SearchAction",
"target": "http://example.com/pages/search_results?q={search_term}",
"query-input": "required name=search_term"
}
}</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment