2. Invoking Bikeshed Without Installing
While a locally-installed Bikeshed does provide additional functionality, if all you need to do is process a spec, there is an API server you can talk to, maintained by Peter Linss.
2.1. Using Curl
These instructions assume use of the curl command,
but you can use any equivalent "talk HTTP at a server" command you might have access to.
curl https://api.csswg.org/bikeshed/ -Ffile = @index.bs -Fforce = 1 > index.html
Simplest possible usage:
-
passing the source as
-F file=@index.bs -
forcing output even if there are errors with
-F force=1 -
piping the output to the desired filename with
> index.html.
Additional possible arguments:
-
-F output=errto just receive errors, if any -
-F md-Foo=barto pass aFoo: barmetadata to the spec (same as passing--md-Foo=barlocally) -
-F die-on=[nothing, fatal, link-error, warning, everything], (same as the--die-onlocal flag)
curl http://api.csswg.org/bikeshed/ -Furl = http://dev.w3.org/csswg/css-syntax/Overview.bs -Fforce = 1 > Overview.html
If you are using additional files beyond your plain source file—local boilerplate files, sub-document includes, custom definition files, etc—this is the only way to make those still work via the curl API; Bikeshed will look for the additional files relative to the source document’s url.
(Any additional files that get included implicitly,
such as local boilerplates,
must be listed in the Local Boilerplate
or External Infotrees metadatas
to get picked up.
Files explicitly listed in the source file,
such as in a ,
will be picked up automatically.)
bikeshed issues-list command
(for generating issues lists for a W3C Disposition of Comments)
can also be invoked via curl:
curl http://api.csswg.org/bikeshed/ -Ffile = @Issues.txt -Finput = issues > Issues.html
2.2. Using the Web Form
Alternately, you can just visit https://api.csswg.org/bikeshed/ directly, and upload a file, point to a URL, or directly paste in your spec source.
It defaults to outputting both the HTML and the errors, but you can switch it to one or the other only if you want.
2.3. Using CI Tools
2.3.1. Travis CI
To use bikeshed on Travis CI’s github integration, you’ll need the following .travis.yml commands:
language : pythonpython : -"3.12" install : - pip install bikeshed - bikeshed updatescript : # Invoke bikeshed here, at your own leisure. E.g.: - bikeshed spec
2.3.2. GitHub Actions
The W3C maintains a spec-prod GitHub Action that allows automatically processing commits or PRs as either Bikeshed or ReSpec.
To use, add a file to .github/workflows/ folder in your GitHub project,
containing:
name : CIon : workflow_dispatch : {}pull_request : {}push : branches : [main ]jobs : main : name : Build, Validate and Deployruns-on : ubuntu-latestpermissions : contents : writesteps : -uses : actions/checkout@v4 -uses : w3c/spec-prod@v2with : TOOLCHAIN : bikeshed# Modify as appropriate GH_PAGES_BRANCH : gh-pages# if your doc isn't in the root folder, # or Bikeshed otherwise can't find it: SOURCE : src/spec.bs# output filename defaults to your input # with .html extension instead, # but if you want to customize it: DESTINATION : src/index.html
The linked document has a number of usage examples to achieve various outcomes—simple validation, auto-publishing on w3.org/TR, building multiple specs from a single repository, and some others. It also explains the entire process from start to finish, if you need more help setting things up.