-
Notifications
You must be signed in to change notification settings - Fork 1
/
commands.html
302 lines (290 loc) · 16 KB
/
commands.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!doctype html>
<!-- https://github.com/paulirish/html5-boilerplate/blob/master/index.html -->
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- encoding must be specified within the first 512 bytes
www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset -->
<!-- meta element for compatibility mode needs to be before
all elements except title & meta
msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx -->
<!-- Chrome Frame is only invoked if meta element for
compatibility mode is within the first 1K bytes
code.google.com/p/chromium/issues/detail?id=23003 -->
<title>Command Line</title>
<meta name="description" content="Awesome documentation for hyde - a python static website generator
">
<meta name="author" content="Lakshmi Vyasarajan">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico & apple-touch-icon.png
in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<script type="text/javascript" src="http://use.typekit.com/hyw1bsz.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<link rel="stylesheet" href="/media/css/site.css">
<link rel="stylesheet" href="/media/css/syntax.css">
<!-- All JavaScript at the bottom, except for Modernizr which
enables HTML5 elements & feature detects -->
<script src="/media/js/libs/modernizr-1.6.min.js"></script>
</head>
<body id="commands">
<div id="container">
<div id="main" role="main">
<header class="banner clearfix">
<img src="/media/img/hyde-logo-128.png">
<h1>hyde</h1>
<h3>A static website generator</h3> </header>
<div class="doc">
<article>
<hgroup>
<h1 class="title">Command Line</h1>
<h3 class="subtitle">working with hyde</h3>
</hgroup>
<p>The hyde command line supports these subcommands:</p>
<ol>
<li>create - Initializes a new site at a given path</li>
<li>gen - Generates the website to a configured deploy folder</li>
<li>serve - Starts a local http server that regenerates based on the
requested file</li>
<li>publish - Publishes the generated site based on configuration.</li>
</ol>
<h2 id="the_create_command">The create command</h2>
<p>Creates a new hyde website.
<div class="codebox"><figure class="code"><div class="highlight"><pre>hyde create<br /> <br />hyde <span class="o">[</span>-s </site/path><span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> create <span class="o">[</span>-l <layout><span class="o">]</span> <span class="o">[</span>-f<span class="o">]</span> <span class="o">[</span>-h<span class="o">]</span><br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
<dl>
<dt><code>-s SITEPATH, --sitepath SITEPATH</code></dt>
<dd>
<p>Where the site must be created.</p>
<p>Path must not exist. If it exists then the <code>-f</code> option must be specified
to overwrite the folder.</p>
<p><em>Optional</em> - defaults to current working directory - in this case it
requires the <code>-f</code> parameter.</p>
</dd>
<dt><code>-f, --force</code></dt>
<dd>
<p>Specifying this option will overwrite files and folders at the given
site path.</p>
<p><em>Optional</em> - If the target directory is not empty, hyde will throw an
exception unless this is specified.</p>
</dd>
<dt><code>-l LAYOUT, --layout LAYOUT</code></dt>
<dd>
<p>The name of the layout to use for creating the initial site. Hyde currently
has three layouts: <code>basic</code>, <code>test</code> and <code>doc</code>.</p>
<p>While basic and test are really barebones, doc is the one that generates
this documentation and is completely usable. Hyde will get more layouts
over time.</p>
<p>Hyde tries to locate the specified layout in the following folders:</p>
<ol>
<li>In <code>layouts</code> folder under the path specified by the <code>HYDE_DATA</code>
environment variable</li>
<li>In <code>layouts</code> folder under hyde</li>
</ol>
<p><em>Optional</em> - defaults to <code>basic</code></p>
<p>Assuming the <code>HYDE_DATA</code> environment variable is empty and the folder
<code>~/test</code> is empty, the following command will create a new hyde site
at <code>~/test</code> with the contents of <code>layouts/doc</code> folder:
<div class="codebox"><figure class="code"><div class="highlight"><pre>hyde -s ~/test create -l doc<br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
</dd>
<dt><code>-v, --verbose</code></dt>
<dd>
<p>Logs detailed messages to the console.</p>
<p><em>Optional</em> - shows only essential messages if this option is omitted.</p>
</dd>
<dt><code>-h</code></dt>
<dd>
<p>Displays the help text for the <code>create</code> command.</p>
</dd>
</dl>
<h2 id="the_generate_command">The generate command</h2>
<p>Generates the given website.
<div class="codebox"><figure class="code"><div class="highlight"><pre>hyde gen<br /> <br />hyde <span class="o">[</span>-s <site/path><span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> gen <span class="o">[</span>-r<span class="o">]</span> <span class="o">[</span>-d <deploy/path><span class="o">]</span> <span class="o">[</span>-c <config/path><span class="o">]</span> <span class="o">[</span>-h<span class="o">]</span><br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
<dl>
<dt><code>-s SITEPATH, --sitepath SITEPATH</code></dt>
<dd>
<p>The path to the site to be generated.</p>
<p><em>Optional</em> - defaults to current working directory.</p>
</dd>
<dt><code>-r, --regen</code></dt>
<dd>
<p>Regenerate the entire website. By default hyde performs incremental
generation. While hyde does a good job at understanding the dependencies,
its far from perfect. When there are cases where the incremental
generation does not yield the desired results, you can provide this option
to generate the website from scratch.</p>
<p><em>Optional</em> - defaults to incremental generation.</p>
</dd>
<dt><code>-d DEPLOY_PATH, --deploy-path DEPLOY_PATH</code></dt>
<dd>
<p>Location where the site should be generated. This option overrides any
setting specified in the hyde <a href="/config">configuration</a>. The path is assumed to
be relative to the site path unless a preceding path separator is found.</p>
<p><em>Optional</em> - Uses what is specified in the config file. The default option
in the configuration file is: <code>deploy</code> folder under the current site path.</p>
</dd>
<dt><code>-c CONFIG, --config-path CONFIG</code></dt>
<dd>
<p>This is used for specifying an alternate configuration file to use for
generating the site. This is useful if you have two different configurations
for you production versus development websites.</p>
<p>The path is assumed to be relative to the site path unless a preceding path
separator is found.</p>
<p><em>Optional</em> - defaults to <code>site.yaml</code></p>
<p>The following command will use <code>production.yaml</code> as the configuration file and
generate the website at <code>~/test</code> to <code>~/production_site</code> directory.
<div class="codebox"><figure class="code"><div class="highlight"><pre><span class="nb">cd</span> ~/test<br /> hyde gen -c production.yaml -d ~/production_site<br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
</dd>
<dt><code>-v, --verbose</code></dt>
<dd>
<p>Logs detailed messages to the console.</p>
<p><em>Optional</em> - shows only essential messages if this option is omitted.</p>
</dd>
<dt><code>-h</code></dt>
<dd>
<p>Displays the help text for the <code>gen</code> command.</p>
</dd>
</dl>
<h2 id="the_serve_command">The serve command</h2>
<p>Starts the built in web server that also regenerates based on the request if there are
changes.
<div class="codebox"><figure class="code"><div class="highlight"><pre>hyde serve<br /> <br />hyde <span class="o">[</span>-s </site/path><span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> gen <span class="o">[</span>-d </deploy/path><span class="o">]</span> <span class="o">[</span>-c <config/path><span class="o">]</span> <span class="o">[</span>-h<span class="o">]</span><br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
<dl>
<dt><code>-s SITEPATH, --sitepath SITEPATH</code></dt>
<dt><code>-d DEPLOY_PATH, --deploy-path DEPLOY_PATH</code></dt>
<dt><code>-c CONFIG, --config-path CONFIG</code></dt>
<dd>
<p>Since the <code>serve</code> command auto generates if there is a need, it needs
the same parameters as the <code>gen</code> command. The above parameters serve
the same purpose here as in the <code>gen</code> command.</p>
</dd>
<dt><code>-a ADDRESS, --address ADDRESS</code></dt>
<dd>
<p>The address to serve the website.</p>
<p><em>Optional</em> - defaults to <code>localhost</code></p>
</dd>
<dt><code>-p PORT, --port</code></dt>
<dd>
<p>The port to serve the website.</p>
<p><em>Optional</em> - defaults to <code>8080</code></p>
<p>The following command will serve the website at <code>http://localhost:8181</code>
<div class="codebox"><figure class="code"><div class="highlight"><pre><span class="nb">cd</span> ~/test<br /> hyde serve -p 8181<br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
</dd>
<dt><code>-h</code></dt>
<dd>
<p>Displays the help text for the <code>serve</code> command.</p>
</dd>
</dl>
<h2 id="the_publish_command">The publish command</h2>
<p>Publishes the site based on configuration. Currently the only supported
publishing target is a git repository. See the <a href="/publisher">publisher documentation</a>
for more information.
<div class="codebox"><figure class="code"><div class="highlight"><pre>hyde <span class="o">[</span>-s </site/path><span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> publish -p <conf> <span class="o">[</span>-m <msg><span class="o">]</span> <span class="o">[</span>-c <config/path><span class="o">]</span> <span class="o">[</span>-h<span class="o">]</span><br /></pre></div><br /><figcaption>Bash</figcaption></figure></div></p>
<dl>
<dt><code>-s SITEPATH, --sitepath SITEPATH</code></dt>
<dd>
<p>The path to the site to be generated.</p>
<p><em>Optional</em> - defaults to current working directory.</p>
</dd>
<dt><code>-p CONFIG</code></dt>
<dd>
<p>This should point to a configuration section in the site configuration
that has the settings for the publisher. For example:</p>
<p>The following configuration (taken from this site), when invoked with
<code>hyde publish -p github</code> will use the Git publisher to publish the
generated site to <code>hyde/hyde.github.com</code> repository.
<div class="codebox"><figure class="code"><div class="highlight"><pre><span class="l-Scalar-Plain">publisher</span><span class="p-Indicator">:</span><br /> <span class="l-Scalar-Plain">github</span><span class="p-Indicator">:</span><br /> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">hyde.ext.publishers.dvcs.Git</span><br /> <span class="l-Scalar-Plain">path</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">../hyde.github.com</span><br /> <span class="l-Scalar-Plain">url</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">[email protected]:hyde/hyde.github.com.git</span><br /></pre></div><br /><figcaption><span class="caps">YAML</span></figcaption></figure></div></p>
</dd>
</dl> </article>
<aside>
<ul class="toc">
<li><mark class="version">Version: 0.8</mark></li>
<li class="topic" id="topic1">
<ul class="links">
<li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/index.html">
Overview</a> </li>
</ul>
</li><li class="topic" id="topic2">
<h2 class=" active">Getting Started</h2> <ul class="links">
<li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/install.html">
Installation</a><li>
<a class="active" title="Awesome documentation for hyde - a python static website generator
"
href="/commands.html">
Command Line</a><li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/server.html">
Hyde web server</a><li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/config.html">
Configuration</a> </li>
</ul>
</li><li class="topic" id="topic3">
<h2 class="">Templating Guide</h2> <ul class="links">
<li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/templates/index.html">
Creating layouts</a><li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/templates/context.html">
Context Variables</a><li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/templates/markrefer.html">
References</a><li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/templates/text.html">
Text</a><li>
<a title="Awesome documentation for hyde - a python static website generator
"
href="/templates/traversing.html">
Traversing</a> </li>
</ul>
</li> </ul>
<nav class="prevnext">
<a
class="prev"
title="Installation"
href="/install.html">
←Previous
</a> <a
class="next"
title="Hyde web server"
href="/server.html">
Next→
</a> <br class="clear">
</nav>
</aside>
</div>
<footer>
<p><a href="https://github.com/hyde/hyde">smelted with hyde</a> —
<a href="https://github.com/hyde/hyde.github.com/issues">spot <span class="amp">&</span> complain</a> —
<a href="https://github.com/hyde/docs">fork <span class="amp">&</span> fix</a></p></footer> </div>
<footer>
</footer>
</div> <!--! end of #container -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="/media/js/libs/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>
</body>
</html>