A fork of hyde, the static site generation. Some patches will be pushed upstream.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

197 lines
9.4 KiB

  1. <!doctype html>
  2. <!-- https://github.com/paulirish/html5-boilerplate/blob/master/index.html -->
  3. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  4. <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
  5. <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
  6. <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
  7. <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
  8. <head>
  9. <meta charset="utf-8">
  10. <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  11. Remove this if you use the .htaccess -->
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  13. <!-- encoding must be specified within the first 512 bytes
  14. www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset -->
  15. <!-- meta element for compatibility mode needs to be before
  16. all elements except title & meta
  17. msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx -->
  18. <!-- Chrome Frame is only invoked if meta element for
  19. compatibility mode is within the first 1K bytes
  20. code.google.com/p/chromium/issues/detail?id=23003 -->
  21. <title>Command Line</title>
  22. <meta name="description" content="Awesome documentation for hyde - a python static website generator
  23. ">
  24. <meta name="author" content="Lakshmi Vyasarajan">
  25. <!-- Mobile viewport optimized: j.mp/bplateviewport -->
  26. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  27. <!-- Place favicon.ico & apple-touch-icon.png
  28. in the root of your domain and delete these references -->
  29. <link rel="shortcut icon" href="/favicon.ico">
  30. <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  31. <script type="text/javascript" src="http://use.typekit.com/hyw1bsz.js"></script>
  32. <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
  33. <link rel="stylesheet" href="/media/css/site.css">
  34. <!-- All JavaScript at the bottom, except for Modernizr which
  35. enables HTML5 elements & feature detects -->
  36. <script src="/media/js/libs/modernizr-1.6.min.js"></script>
  37. </head>
  38. <body id="commandline">
  39. <div id="container">
  40. <div id="main" role="main">
  41. <header class="banner clearfix">
  42. <img src="/media/img/hyde-logo-128.png">
  43. <h1>hyde 1.0</h1>
  44. <h3>static hotness</h3> </header>
  45. <article>
  46. <hgroup>
  47. <h1 class="title">Command Line</h1>
  48. <h3 class="subtitle">working with hyde</h3>
  49. </hgroup>
  50. <p>The hyde command line supports three&nbsp;subcommands:</p>
  51. <ol>
  52. <li>create - Initializes a new site at a given&nbsp;path</li>
  53. <li>gen - Generates the website to a configured deploy&nbsp;folder</li>
  54. <li>serve - Starts a local http server that regenerates based on the requested&nbsp;file</li>
  55. </ol>
  56. <h2 id="the_create_command">The create&nbsp;command</h2>
  57. <p>Creates a new hyde&nbsp;website.</p>
  58. <div class="code"><div class="highlight"><pre>hyde create<br />&nbsp;<br />hyde <span class="o">[</span>-s &lt;/site/path&gt;<span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> create <span class="o">[</span>-l &lt;layout&gt;<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 /></div>
  59. <ul>
  60. <li>
  61. <p><code>-s SITEPATH, --sitepath SITEPATH</code></p>
  62. <p>Where the site must be created. If this path is not empty then the <code>-f</code>
  63. option must be specified to overwrite the&nbsp;site.</p>
  64. <p><em>Optional</em> - defaults to current working&nbsp;directory.</p>
  65. </li>
  66. <li>
  67. <p><code>-f, --force</code></p>
  68. <p>Specifying this option will overwrite files and folders at the given
  69. site&nbsp;path.</p>
  70. <p><em>Optional</em> - If the target directory is not empty, hyde will throw an
  71. exception unless this is&nbsp;specified.</p>
  72. </li>
  73. <li>
  74. <p><code>-l LAYOUT, --layout LAYOUT</code></p>
  75. <p>The name of the layout to use for creating the initial site. Hyde currently
  76. has three layouts: <code>basic</code>, <code>test</code> and <code>doc</code>.</p>
  77. <p>While basic and test are really barebones, doc is the one that generates
  78. this documentation and is completely usable. Hyde will get more layouts
  79. as over&nbsp;time.</p>
  80. <p>Hyde tries to locate the specified layout in the following&nbsp;folders:</p>
  81. <ol>
  82. <li>In <code>layouts</code> folder under the path specified by the <code>HYDE_DATA</code>
  83. environment&nbsp;variable</li>
  84. <li>In <code>layouts</code> folder under&nbsp;hyde</li>
  85. </ol>
  86. <p><em>Optional</em> - defaults to <code>basic</code></p>
  87. </li>
  88. <li>
  89. <p><code>-v, --verbose</code></p>
  90. <p>Logs detailed messages to the&nbsp;console.</p>
  91. <p><em>Optional</em> - shows only essential messages if this option is&nbsp;omitted.</p>
  92. </li>
  93. <li>
  94. <p><code>-h</code></p>
  95. <p>Displays the help text for the <code>create</code> command.</p>
  96. </li>
  97. </ul>
  98. <p>Assuming the <code>HYDE_DATA</code> environment variable is empty and the folder
  99. <code>~/test</code> is empty, the following command will create a new hyde site
  100. at <code>~/test</code> with the contents of <code>layouts/doc</code> folder:</p>
  101. <div class="code"><div class="highlight"><pre>hyde -s ~/test create -l doc<br /></pre></div><br /></div>
  102. <h2 id="the_generate_command">The generate&nbsp;command</h2>
  103. <p>Generates the given&nbsp;website.</p>
  104. <div class="code"><div class="highlight"><pre>hyde gen<br />&nbsp;<br />hyde <span class="o">[</span>-s &lt;/site/path&gt;<span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> gen <span class="o">[</span>-d &lt;/deploy/path&gt;<span class="o">]</span> <span class="o">[</span>-c &lt;config/path&gt;<span class="o">]</span> <span class="o">[</span>-h<span class="o">]</span><br /></pre></div><br /></div>
  105. <ul>
  106. <li>
  107. <p><code>-s SITEPATH, --sitepath SITEPATH</code></p>
  108. <p>The path to the site to be&nbsp;generated.</p>
  109. <p><em>Optional</em> - defaults to current working&nbsp;directory.</p>
  110. </li>
  111. <li>
  112. <p><code>-d DEPLOY_PATH, --deploy-path DEPLOY_PATH</code></p>
  113. <p>Location where the site should be generated. This option overrides any
  114. setting specified in the hyde [configuration][]. The path is assumed to
  115. be relative to the site path unless a preceding path separator is&nbsp;found.</p>
  116. <p><em>Optional</em> - Uses what is specified in the config file. The default option
  117. in the configuration file is: <code>deploy</code> folder under the current site&nbsp;path.</p>
  118. </li>
  119. <li>
  120. <p><code>-c CONFIG, --config-path CONFIG</code></p>
  121. <p>This is used for specifying an alternate configuration file to use for
  122. generating the site. This is useful if you have two different configurations
  123. for you production versus development&nbsp;websites.</p>
  124. <p>The path is assumed to be relative to the site path unless a preceding path
  125. separator is&nbsp;found.</p>
  126. <p><em>Optional</em> - defaults to <code>site.yaml</code></p>
  127. </li>
  128. <li>
  129. <p><code>-v, --verbose</code></p>
  130. <p>Logs detailed messages to the&nbsp;console.</p>
  131. <p><em>Optional</em> - shows only essential messages if this option is&nbsp;omitted.</p>
  132. </li>
  133. <li>
  134. <p><code>-h</code></p>
  135. <p>Displays the help text for the <code>gen</code> command.</p>
  136. </li>
  137. </ul>
  138. <p>The following command will use <code>production.yaml</code> as the configuration file and
  139. generate the website at <code>~/test</code> to <code>~/production_site</code> directory.</p>
  140. <div 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 /></div>
  141. <h2 id="the_serve_command">The serve&nbsp;command</h2>
  142. <p>Starts the built in web server that also regenerates based on the request if there are&nbsp;changes.</p>
  143. <div class="code"><div class="highlight"><pre>hyde serve<br />&nbsp;<br />hyde <span class="o">[</span>-s &lt;/site/path&gt;<span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> gen <span class="o">[</span>-d &lt;/deploy/path&gt;<span class="o">]</span> <span class="o">[</span>-c &lt;config/path&gt;<span class="o">]</span> <span class="o">[</span>-h<span class="o">]</span><br /></pre></div><br /></div>
  144. <ul>
  145. <li><code>-s SITEPATH, --sitepath SITEPATH</code>
  146. <code>-d DEPLOY_PATH, --deploy-path DEPLOY_PATH</code>
  147. <code>-c CONFIG, --config-path CONFIG</code></li>
  148. </ul>
  149. <p>Since the <code>serve</code> command auto generates if there is a need, it needs the same
  150. parameters as the <code>gen</code> command. The above parameters serve the same purpose here
  151. as in the <code>gen</code> command.</p>
  152. <ul>
  153. <li><code>-a ADDRESS, --address ADDRESS</code></li>
  154. </ul>
  155. <p>The address to serve the&nbsp;website.</p>
  156. <p><em>Optional</em> - defaults to <code>localhost</code></p>
  157. <ul>
  158. <li><code>-p PORT, --port</code></li>
  159. </ul>
  160. <p>The port to serve the&nbsp;website.</p>
  161. <p><em>Optional</em> - default to <code>8080</code></p>
  162. <ul>
  163. <li><code>-h</code></li>
  164. </ul>
  165. <p>Displays the help text for the <code>serve</code> command.</p>
  166. <p>The following command will serve the website at <code>http://localhost:8181</code></p>
  167. <div class="code"><div class="highlight"><pre><span class="nb">cd</span> ~/test<br />hyde serve -p 8181<br /></pre></div><br /></div>
  168. <p></article>
  169. <aside>
  170. </aside></p> </div>
  171. <footer>
  172. </footer>
  173. </div> <!--! end of #container -->
  174. <!-- Javascript at the bottom for fast page loading -->
  175. <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
  176. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
  177. <script>!window.jQuery && document.write(unescape('%3Cscript src="/media/js/libs/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>
  178. </body>
  179. </html>