Skip to content

Commit 4a96a8d

Browse files
committed
document support for ReSpec
1 parent fa46951 commit 4a96a8d

File tree

6 files changed

+159
-55
lines changed

6 files changed

+159
-55
lines changed

generator/content/how-to/create.html

+52-21
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,44 @@ <h2 id="forking">Forking</h2>
5151
categories, just pick a self-descriptive name that you like.
5252
</p>
5353
<p>
54-
You will then need to edit your specification. The file you will want to change will typically
55-
be called <code>index.bs</code> (but other <code>*.bs</code> variants are possible). The
56-
format is "Bikeshed", a Markdown flavour that is popular for specification writing and for
57-
which you can <a href="https://github.com/tabatkins/bikeshed/tree/master/docs">read
58-
documentation online</a>. If you are familiar with Markdown you ought to find Bikeshed easy.
59-
If you are of those who hate Markdown, do not despair: an alternative HTML-based format will
60-
soon be made available as well.
54+
You will then need to edit your specification. WebSpecs can come in two formats. If you see a
55+
file called <code>index.bs</code> (or other <code>*.bs</code> file name variant, though those
56+
are discouraged) then the syntax is “Bikeshed”. If there’s an <code>index.src.html</code> file
57+
(or, again, <code>*.src.html</code> variants are technically possible but as of this writing
58+
there actually aren’t any) then the format is “ReSpec”.
6159
</p>
6260
<p>
63-
It is recommended to have a copy of Bikeshed installed (preferably in a directory parallel to
64-
the specifications you are working on) but it is not required.
61+
Bikeshed is a Markdown flavour popular for specification writing and for which you can <a
62+
href="https://github.com/tabatkins/bikeshed/tree/master/docs">read documentation online</a>.
63+
If you are familiar with Markdown you ought to find Bikeshed easy. If you are of those who
64+
hate Markdown, do not despair: the alternative is an HTML-based format.
65+
</p>
66+
<p>
67+
If you use Bikeshed, it is recommended to have a copy of Bikeshed installed (preferably in a
68+
directory parallel to the specifications you are working on) but it is not required.
69+
</p>
70+
<p>
71+
If you prefer HTML and JS to Markdown, WebSpecs can also be written using ReSpec. Like
72+
Bikeshed it takes care of a lot of the things you don’t want to have to think about. You can
73+
start from <a href="http://www.w3.org/respec/examples/minimal-w3c.html">a very basic
74+
example</a> and only tweak the configuration (near the top of the source) to set
75+
<code>specStatus</code> to <code>"webspec"</code> and <code>repository</code> to the
76+
<code>user/repo-name</code> string that fits your specification. Call the file
77+
<code>index.src.html</code> and you’re good to go! It should look like
78+
<a href="http://www.w3.org/respec/examples/minimal-w3c.html?specStatus=webspec;repository=w3c/respec-docs">this
79+
very basic example</a>, which is in fact the same as linked right above but with its
80+
configuration overridden in the query string.
6581
</p>
6682
<p>
6783
Make changes, push them, etc. Once you want to publish your work to the community, simply
6884
make a pull-request against <a href="https://github.com/webspecs/the-index">the-index</a>.
6985
That is the document that sits at the root of
7086
<a href="https://specs.webplatform.org/">https://specs.webplatform.org/</a> and which drives
71-
the automatic publishing system. When your PR is reviewed, you will be given simple
72-
instructions to ensure that your fork is automatically published whenever you make changes to
73-
it. Once your PR is accepted, the WebSpecs index will be updated and your specification will
74-
be published.
87+
the automatic publishing system. For a fork you will mostly just want to add a pointer to your own
88+
<code>user/repo#branch</code>. When your PR is reviewed, in order to ensure that your fork is
89+
automatically published whenever you make changes to it you just need to create a Web hook in
90+
your GitHub repository that points to <code>http://publican.berjon.com/hook</code>. Once your
91+
PR is accepted, the WebSpecs index will be updated and your specification will be published.
7592
</p>
7693
<p>
7794
That's it!
@@ -91,22 +108,36 @@ <h2 id="scratch">Starting From Scratch</h2>
91108
<p>
92109
You will want to install the <code>webspec</code> tool, which is straightforward: <code>npm
93110
install -g webspec</code>. Note: in the close future this tool will be replace with a simpler
94-
Web interface that carries out the same basic tasks.
111+
Web interface that carries out the same basic tasks. Also, the current tool does not support
112+
all the nice features that are available, don’t hesitate to just ask for help setting up until
113+
the Web tool is ready.
114+
</p>
115+
<p>
116+
As indicated in the previous section, if you’re using Bikeshed it is a good idea to clone it
117+
in a directory parallel to the ones in which you edit specifications. While not required (the
118+
source gets regenerated at publish time anyway) it allows you to check that you don't have
119+
errors in your draft.
95120
</p>
96121
<p>
97-
As indicated in the previous section, it is a good idea to clone Bikeshed in a directory
98-
parallel to the ones in which you edit specifications. While not required (the source gets
99-
regenerated at publish time anyway) it allows you to check that you don't have errors in your
100-
draft.
122+
For ReSpec, the generation is done in the browser so there is nothing to install. When you
123+
load your <code>index.src.html</code> in your browser, a little “ReSpec” pill shows up in the
124+
top right corner of the page (which isn't present in the published version of the document).
125+
If there are errors with your specification, they’ll be reported there.
101126
</p>
102127
<p>
103128
While at the root of your specification's directory, type <code>webspec new</code> and follow
104-
the instructions. (Note: the current default license of "CC0" is likely to change.)
129+
the instructions. (Note: the current default license of "CC0" will soon change across the
130+
board, for ReSpec documents it is already a new option.)
105131
</p>
106132
<p>
107133
This should give you a specification that's ready to go! At this point you are ready to make
108-
a pull-request against <a href="https://github.com/webspecs/the-index">the-index</a> and
109-
follow the subsequent instructions. You're good to go!
134+
a pull-request against <a href="https://github.com/webspecs/the-index">the-index</a> to add a
135+
section briefly describing your specification (copy freely from the others) and pointing to
136+
your <code>user/repo#branch</code>. When your PR is reviewed, in order to ensure that your
137+
fork is automatically published whenever you make changes to it you just need to create a Web
138+
hook in your GitHub repository that points to <code>http://publican.berjon.com/hook</code>.
139+
Once your PR is accepted, the WebSpecs index will be updated and your specification will be
140+
published. You're good to go!
110141
</p>
111142
</section>
112143
<section>

generator/content/how-to/index.html

+15-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@
1818
You want to jump in and actually write some text, either from scratch or as a modification to
1919
someone else’s work. The details are on this page.
2020
</dd>
21-
<dt><a href="https://github.com/tabatkins/bikeshed/tree/master/docs">Bikeshed — the syntax of WebSpecs</a></dt>
21+
<dt><a href="https://github.com/tabatkins/bikeshed/tree/master/docs">Bikeshed — Markdown for WebSpecs</a></dt>
2222
<dd>
23-
WebSpecs are written using a Markdown flavour known as “Bikeshed” that happens to have a lot
23+
WebSpecs can be written using a Markdown flavour known as “Bikeshed” that happens to have a lot
2424
of tricks up its sleeve that comes in handy when producing a specification. There’s a lot that
2525
can be known about Bikeshed, but you don’t need to learn more than the very basics in order
2626
to get started — and the rest ought to come easy.
2727
</dd>
28+
<dt><a href="http://w3.org/respec/">ReSpec — HTML for WebSpecs</a></dt>
29+
<dd>
30+
If you prefer HTML and JS to Markdown, WebSpecs can also be written using ReSpec. Like
31+
Bikeshed it takes care of a lot of the things you don’t want to have to think about. You can
32+
start from <a href="http://www.w3.org/respec/examples/minimal-w3c.html">a very basic
33+
example</a> and only tweak the configuration (near the top of the source) to set
34+
<code>specStatus</code> to <code>"webspec"</code> and <code>repository</code> to the
35+
<code>user/repo-name</code> string that fits your specification. Call the file
36+
<code>index.src.html</code> and you’re good to go! It should look like
37+
<a href="http://www.w3.org/respec/examples/minimal-w3c.html?specStatus=webspec;repository=w3c/respec-docs">this
38+
very basic example</a>, which is in fact the same as linked right above but with its
39+
configuration overridden in the query string.
40+
</dd>
2841
</dl>

generator/content/index.html

+13-5
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ <h2>Current Status</h2>
9292
<li>
9393
Support tooling to create specifications is available, notably
9494
<a href="https://github.com/webspecs/webspec">to create and validate specifications</a> and
95-
to <a href="https://github.com/webspecs/bikeshed">generate them</a>.
95+
to generate them using either <a href="https://github.com/webspecs/bikeshed">Bikeshed</a> or
96+
<a href="http://w3.org/respec/">ReSpec</a>.
9697
</li>
9798
<li>
9899
Our sister project <a href="https://github.com/w3c/web-platform-tests/">Web Platform
@@ -158,10 +159,17 @@ <h2>How Things Work</h2>
158159
done open source development.
159160
</p>
160161
<p>
161-
Specifications are written in a Markdown variant known as <a
162-
href="https://github.com/webspecs/bikeshed">Bikeshed</a>, by the most excellent Tab Atkins. It
163-
takes care of a lot of the boring stuff involved in specifications, such as cross-references,
164-
consistent styling, numbered sections and tables of contents, and much, much more.
162+
Specifications are written using formats that are friendly to people who know Web technology
163+
but aren’t necessarily standards experts. There are two options. If you prefer HTML and
164+
JavaScript then <a href="http://w3.org/respec/">ReSpec</a> (see also
165+
<a href="https://github.com/w3c/respec">the source</a>) is a popular option. The idea is that
166+
you write straightforward HTML and this little JavaScript library handles all the stuff you
167+
don't want to be thinking about for you. If you're more with the Markdown (or is it
168+
CommonMark now?), or if you’re like Python, you can use the most excellent
169+
<a href="https://github.com/webspecs/bikeshed">Bikeshed</a>, by the most excellent Tab Atkins.
170+
Rooted in simple Markdown conventions, like ReSpec it takes care of a lot of the boring stuff
171+
involved in specifications, such as cross-references, consistent styling, numbered sections
172+
and tables of contents, and much, much more.
165173
</p>
166174
<p>
167175
To file a bug against a specification, just do so in its GitHub repository (the link will be

how-to/create.html

+51-21
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,43 @@ <h2 id="forking">Forking</h2>
7676
categories, just pick a self-descriptive name that you like.
7777
</p>
7878
<p>
79-
You will then need to edit your specification. The file you will want to change will typically
80-
be called <code>index.bs</code> (but other <code>*.bs</code> variants are possible). The
81-
format is "Bikeshed", a Markdown flavour that is popular for specification writing and for
82-
which you can <a href="https://github.com/tabatkins/bikeshed/tree/master/docs">read
83-
documentation online</a>. If you are familiar with Markdown you ought to find Bikeshed easy.
84-
If you are of those who hate Markdown, do not despair: an alternative HTML-based format will
85-
soon be made available as well.
79+
You will then need to edit your specification. WebSpecs can come in two formats. If you see a
80+
file called <code>index.bs</code> (or other <code>*.bs</code> file name variant, though those
81+
are discouraged) then the syntax is “Bikeshed”. If there’s an <code>index.src.html</code> file
82+
(or, again, <code>*.src.html</code> variants are technically possible but as of this writing
83+
there actually aren’t any) then the format is “ReSpec”.
8684
</p>
8785
<p>
88-
It is recommended to have a copy of Bikeshed installed (preferably in a directory parallel to
89-
the specifications you are working on) but it is not required.
86+
Bikeshed is a Markdown flavour popular for specification writing and for which you can <a href="https://github.com/tabatkins/bikeshed/tree/master/docs">read documentation online</a>.
87+
If you are familiar with Markdown you ought to find Bikeshed easy. If you are of those who
88+
hate Markdown, do not despair: the alternative is an HTML-based format.
89+
</p>
90+
<p>
91+
If you use Bikeshed, it is recommended to have a copy of Bikeshed installed (preferably in a
92+
directory parallel to the specifications you are working on) but it is not required.
93+
</p>
94+
<p>
95+
If you prefer HTML and JS to Markdown, WebSpecs can also be written using ReSpec. Like
96+
Bikeshed it takes care of a lot of the things you don’t want to have to think about. You can
97+
start from <a href="http://www.w3.org/respec/examples/minimal-w3c.html">a very basic
98+
example</a> and only tweak the configuration (near the top of the source) to set
99+
<code>specStatus</code> to <code>"webspec"</code> and <code>repository</code> to the
100+
<code>user/repo-name</code> string that fits your specification. Call the file
101+
<code>index.src.html</code> and you’re good to go! It should look like
102+
<a href="http://www.w3.org/respec/examples/minimal-w3c.html?specStatus=webspec;repository=w3c/respec-docs">this
103+
very basic example</a>, which is in fact the same as linked right above but with its
104+
configuration overridden in the query string.
90105
</p>
91106
<p>
92107
Make changes, push them, etc. Once you want to publish your work to the community, simply
93108
make a pull-request against <a href="https://github.com/webspecs/the-index">the-index</a>.
94109
That is the document that sits at the root of
95110
<a href="https://specs.webplatform.org/">https://specs.webplatform.org/</a> and which drives
96-
the automatic publishing system. When your PR is reviewed, you will be given simple
97-
instructions to ensure that your fork is automatically published whenever you make changes to
98-
it. Once your PR is accepted, the WebSpecs index will be updated and your specification will
99-
be published.
111+
the automatic publishing system. For a fork you will mostly just want to add a pointer to your own
112+
<code>user/repo#branch</code>. When your PR is reviewed, in order to ensure that your fork is
113+
automatically published whenever you make changes to it you just need to create a Web hook in
114+
your GitHub repository that points to <code>http://publican.berjon.com/hook</code>. Once your
115+
PR is accepted, the WebSpecs index will be updated and your specification will be published.
100116
</p>
101117
<p>
102118
That's it!
@@ -116,22 +132,36 @@ <h2 id="scratch">Starting From Scratch</h2>
116132
<p>
117133
You will want to install the <code>webspec</code> tool, which is straightforward: <code>npm
118134
install -g webspec</code>. Note: in the close future this tool will be replace with a simpler
119-
Web interface that carries out the same basic tasks.
135+
Web interface that carries out the same basic tasks. Also, the current tool does not support
136+
all the nice features that are available, don’t hesitate to just ask for help setting up until
137+
the Web tool is ready.
138+
</p>
139+
<p>
140+
As indicated in the previous section, if you’re using Bikeshed it is a good idea to clone it
141+
in a directory parallel to the ones in which you edit specifications. While not required (the
142+
source gets regenerated at publish time anyway) it allows you to check that you don't have
143+
errors in your draft.
120144
</p>
121145
<p>
122-
As indicated in the previous section, it is a good idea to clone Bikeshed in a directory
123-
parallel to the ones in which you edit specifications. While not required (the source gets
124-
regenerated at publish time anyway) it allows you to check that you don't have errors in your
125-
draft.
146+
For ReSpec, the generation is done in the browser so there is nothing to install. When you
147+
load your <code>index.src.html</code> in your browser, a little “ReSpec” pill shows up in the
148+
top right corner of the page (which isn't present in the published version of the document).
149+
If there are errors with your specification, they’ll be reported there.
126150
</p>
127151
<p>
128152
While at the root of your specification's directory, type <code>webspec new</code> and follow
129-
the instructions. (Note: the current default license of "CC0" is likely to change.)
153+
the instructions. (Note: the current default license of "CC0" will soon change across the
154+
board, for ReSpec documents it is already a new option.)
130155
</p>
131156
<p>
132157
This should give you a specification that's ready to go! At this point you are ready to make
133-
a pull-request against <a href="https://github.com/webspecs/the-index">the-index</a> and
134-
follow the subsequent instructions. You're good to go!
158+
a pull-request against <a href="https://github.com/webspecs/the-index">the-index</a> to add a
159+
section briefly describing your specification (copy freely from the others) and pointing to
160+
your <code>user/repo#branch</code>. When your PR is reviewed, in order to ensure that your
161+
fork is automatically published whenever you make changes to it you just need to create a Web
162+
hook in your GitHub repository that points to <code>http://publican.berjon.com/hook</code>.
163+
Once your PR is accepted, the WebSpecs index will be updated and your specification will be
164+
published. You're good to go!
135165
</p>
136166
</section>
137167
<section>

how-to/index.html

+15-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,26 @@ <h1 class="onlyTitle">How To Do Stuff</h1>
4343
You want to jump in and actually write some text, either from scratch or as a modification to
4444
someone else’s work. The details are on this page.
4545
</dd>
46-
<dt><a href="https://github.com/tabatkins/bikeshed/tree/master/docs">Bikeshed — the syntax of WebSpecs</a></dt>
46+
<dt><a href="https://github.com/tabatkins/bikeshed/tree/master/docs">Bikeshed — Markdown for WebSpecs</a></dt>
4747
<dd>
48-
WebSpecs are written using a Markdown flavour known as “Bikeshed” that happens to have a lot
48+
WebSpecs can be written using a Markdown flavour known as “Bikeshed” that happens to have a lot
4949
of tricks up its sleeve that comes in handy when producing a specification. There’s a lot that
5050
can be known about Bikeshed, but you don’t need to learn more than the very basics in order
5151
to get started — and the rest ought to come easy.
5252
</dd>
53+
<dt><a href="http://w3.org/respec/">ReSpec — HTML for WebSpecs</a></dt>
54+
<dd>
55+
If you prefer HTML and JS to Markdown, WebSpecs can also be written using ReSpec. Like
56+
Bikeshed it takes care of a lot of the things you don’t want to have to think about. You can
57+
start from <a href="http://www.w3.org/respec/examples/minimal-w3c.html">a very basic
58+
example</a> and only tweak the configuration (near the top of the source) to set
59+
<code>specStatus</code> to <code>"webspec"</code> and <code>repository</code> to the
60+
<code>user/repo-name</code> string that fits your specification. Call the file
61+
<code>index.src.html</code> and you’re good to go! It should look like
62+
<a href="http://www.w3.org/respec/examples/minimal-w3c.html?specStatus=webspec;repository=w3c/respec-docs">this
63+
very basic example</a>, which is in fact the same as linked right above but with its
64+
configuration overridden in the query string.
65+
</dd>
5366
</dl>
5467
</div>
5568
<footer>

0 commit comments

Comments
 (0)