-
-
Notifications
You must be signed in to change notification settings - Fork 389
doJsonLd
Somya Dwivedi edited this page Oct 26, 2020
·
13 revisions
Adds a JSON-LD script
element containing schema.org information, which can be useful for search engines.
The following entry in respecConfig
can be used to configure JSON-LD support, which currently defaults to false
.
var respecConfig = {
doJsonLd: true,
};
In addition, you will also need to provide a canonicalUri
and a license
in your respecConfig
for the JSON-LD data to be generated.
When configured, a script element similar to the following will be added:
<script type="application/ld+json">
{
"@context": [
"https://schema.org",
{
"@vocab": "https://schema.org/",
"@language": "en",
"w3p": "https://www.w3.org/2001/02pd/rec54#",
"foaf": "http://xmlns.com/foaf/0.1/",
"datePublished": { "@type": "xsd:date" },
"inLanguage": { "@language": null },
"isBasedOn": { "@type": "@id" },
"license": { "@type": "@id" }
}
],
"id": "https://w3c.github.io/some-API/",
"type": ["TechArticle"],
"name": "Replace me with a real title",
"inLanguage": "en",
"license": "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document",
"datePublished": "2018-02-22",
"copyrightHolder": {
"name": "World Wide Web Consortium",
"url": "https://www.w3.org/"
},
"discussionUrl": "https://github.com/w3c/some-API/issues/",
"description": "Abstract \n bla bla",
"editor": [
{
"type": "Person",
"name": "Your Name",
"url": "https://your-site.com"
}
],
"citation": [
{
"id": "https://berjon.com/",
"type": "TechArticle",
"name": "The Dahut Specification Example From the Higher Circle",
"url": "https://berjon.com/"
}
]
}
</script>
💖 Support ReSpec by becoming a sponsor via Open Collective. 💖
✨ View rendered version of this documentation at https://respec.org/docs/ ✨
- addSectionLinks
- authors
- caniuse
- edDraftURI
- editors
- favicon
- format (markdown)
- formerEditors
- github
- highlightVars
- isPreview
- license
- lint
- localBiblio
- logos
- maxTocLevel
- mdn
- modificationDate
- noTOC
- otherLinks
- pluralize
- postProcess
- preProcess
- previousDiffURI
- previousMaturity
- previousPublishDate
- prevRecShortname
- prevRecURI
-
processVersion(Deprecated) - publishDate
-
refNote(Deprecated) - shortName
- specStatus
- subjectPrefix
- subtitle
- testSuiteURI
- xref
- additionalCopyrightHolders
-
addPatentNote(Deprecated) - alternateFormats
- canonicalURI
- charterDisclosureURI
- copyrightStart
- crEnd
-
darkMode(deprecated, use dark mode) - doJsonLd
- errata
- group
- implementationReportURI
- lcEnd
- level
- noRecTrack
- prevED
- submissionCommentNumber
-
wg(Deprecated) -
wgId(Deprecated) -
wgPatentPolicy(Deprecated) -
wgPatentURI(Deprecated) - wgPublicList
-
wgURI(Deprecated)
a11y
check-punctuation
local-refs-exist
no-headingless-sections
no-http-props
no-unused-vars
no-unused-dfns
informative-dfn
privsec-section
wpt-tests-exist
Handled by ReSpec for you.
- data-abbr
-
data-cite(Not recommended) - data-dfn-for
- data-dfn-type
- data-format
- data-include-format
- data-include-replace
- data-include
- data-link-for
- data-link-type
- data-local-lt
- data-lt-no-plural
- data-lt-noDefault
- data-lt
- data-number
- data-oninclude
- data-sort
- data-tests
-
data-transform(Deprecated) - data-type
- dir
- lang