-
-
Notifications
You must be signed in to change notification settings - Fork 402
static snapshots
Of course the downside of the approach taken by ReSpec is that the specification as it is expected to be, with all its bells and whistles, exists only in your browser's memory as a DOM. Publishing directly with the script would not work as the source would not pass PubRules. Also, as ReSpec process the document each time a page is visited, it might not feel efficient or quick enough (though ReSpec does a great job caching things for repeating visits). The good news is that ReSpec allows you to export a "static snapshot" on processed document. There is no bad news here.
To save a snapshot from browser itself, click the ReSpec menu button on top-right side of page and select "Export" to open the export menu. You can also hit the Ctrl+Shift+Alt+S key combination for the same. Unless you know what you are doing, pick "HTML" as export format. This will produce a dump of the processed source, which you can download as a HTML file for your specification snapshot. The process is a little bit tedious, but normally you should only need to do it very rarely. You can hit Esc to hide the menu.
To produce static output for your spec source from the command line, you can use a command-line HTTP client such as wget
or curl
and POST your ReSpec source document to the W3C https://labs.w3.org/spec-generator/ spec-generator service as a file upload; for example:
curl -F "file=@source.html" https://labs.w3.org/spec-generator/ > index.html
That command causes curl
to read the source.html
file from the current directory, send an HTTP POST request with the contents of that file as the value of the file
field in the request, and then write the response to the index.html
file.
That index.html
file is a dump of the source.html
file’s DOM, generated by processing the source with ReSpec — that is, exactly the same output you get by manually using Ctrl+Shift+Alt+S within the document itself and picking "Save as HTML (Source)" to save the output.
You can use additional -F
flags with curl
to specify particular ReSpec configuration options:
curl -F "file=@source.html" -F "shortName=dahut" -F specStatus="ED" \
-F "publishDate=2020-02-21" https://labs.w3.org/spec-generator/ > index.html
TODO
💖 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