forked from w3c/w3c.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspecs.html
98 lines (97 loc) · 3.16 KB
/
specs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Using GitHub for Spec Work</title>
<link rel="stylesheet" href="css/wgio.css">
<link rel="icon" type="image/x-icon" href="//labs.w3.org/favicon.ico">
</head>
<body>
<header>
<h1>Using GitHub for Spec Work</h1>
</header>
<nav>
<a href="/">Home</a>
•
<a href="https://github.com/w3c/">Repositories</a>
•
<a href="https://help.github.com/">GitHub Help</a>
</nav>
<main>
<ol>
<li>
<p>
<a href="https://labs.w3.org/repo-manager/repo/new">Create a new GitHub repository</a> using
the <a href="https://labs.w3.org/repo-manager/">W3C Repository Manager</a>.
The spec's <em>shortname</em> in lowercase is usually a good choice.
</p>
</li>
<li>
<p>
Once the new repository is created, find it on GitHub and set up
<a href="https://github.com/blog/2228-simpler-github-pages-publishing">GitHub Pages</a>
to use the default branch, <code>master</code> (<em>Settings</em> / <em>Options</em> / <em>GitHub Pages</em>).
</p>
<p><img src="img/gh-settings.png" alt="GitHub Pages settings of a repository" /></p>
<p>The repository's contents will get <em>automagically</em> served from <code>https://username.github.com/reponame</code>.</p>
<p>⚠️ <strong>NB:</strong> be aware that <a href="faq.html#drafts">GitHub Pages have some limitations</a>.</p>
</li>
<li>
<p>
Clone the repository locally.
</p>
<pre>git clone https://github.com/tobie/specs-on-github.git</pre>
</li>
<li>
<p>
Navigate to the repo.
</p>
<pre>cd specs-on-github</pre>
</li>
<li>
<p>
Now we want to create the spec document itself. I use <a
href="https://github.com/darobin/respec/">ReSpec</a>, so I simply curl the content of the
default template into an <code>index.html</code> page at the root of my repository.
</p>
<pre>curl https://www.w3.org/respec/examples/template.html > index.html</pre>
</li>
<li>
<p>
We can then add it to the repository.
</p>
<pre>git add index.html
git commit -m "Add empty doc."</pre>
</li>
<li>
<p>
Lets now push these changes back to our GitHub account.
</p>
<pre>git push origin master</pre>
<p>
The first time you push changes it can take a little while for the code
to be published to your subdomain, so be patient. But it'll be ready soon enough.
</p>
</li>
<li>
<p>
Set up your <a href="issue-metadata.html">favorite labels</a>
</p>
</li>
<li>
<p>
Bask in the glory of modern spec development.
</p>
</li>
</ol>
<p>(For help and tips about Git itself, refer to <a href="git.html">the dedicated page</a>.)</p>
</main>
<footer>
<address><a href="https://github.com/w3c/w3c.github.io/">We are on GitHub</a></address>
<p>
<a href="https://www.w3.org/"><img src="img/w3c.svg" width="65" height="45" alt="W3C Logo"></a>
</p>
</footer>
</body>
</html>