From 09f4d901420658bccc9abcd86d1693ab5c04c5df Mon Sep 17 00:00:00 2001
From: Henrique Dias <hacdias@gmail.com>
Date: Fri, 16 Oct 2015 20:00:26 +0100
Subject: [PATCH] add docs

---
 docs.html | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 docs.html

diff --git a/docs.html b/docs.html
new file mode 100644
index 00000000..4c0e67e6
--- /dev/null
+++ b/docs.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>hugo - Caddy Directives</title>
+		{{.Include "/includes/docs-head.html"}}
+	</head>
+	<body>
+		<main>
+			<h1>hugo <div class="tag addon">Addon</div></h1>
+
+			<div class="addon-message">
+				<div class="heading"><i class="fa fa-plus-circle"></i> Addon</div>
+				This directive is a Caddy extension. Questions should be directed to its maintainer. <a href="https://github.com/hacdias/caddy-hugo">github.com/hacdias/caddy-hugo</a>
+			</div>
+
+			<p>
+				hugo allows you to deploy and manage a static site with an web-based admin interface where you can edit content, schedule posts, upload files, etc. The admin interface will be available at /admin on your website. It is built to be used with <a href="http://gohugo.io/">Hugo</a> - which is bundled with the plugin so you don't have to install it separately.
+			</p>
+
+			<p>
+				<b>Requirements:</b> this add-on does not create a new Hugo site for you; you'll need to run <code>hugo new site</code> if you don't already have a Hugo site.
+			</p>
+
+			<h3>Syntax</h3>
+      <code class="block"><span class="hl-directive">root</span>  <span class="hl-subdirective">public</span>
+<span class="hl-directive">hugo</span>  <span class="hl-subdirective">dir</span> {
+	<span class="hl-subdirective">styles</span>  <i>file</i>
+	<span class="hl-subdirective">args</span>    <i>cmd</i>
+}</code>
+
+			<ul>
+				<li><b>public</b> is the folder with the public content.</li>
+				<li><b>dir</b> is the folder where the commands are going to be executed. By default, it is the current working directory.</li>
+				<li><b>file</b> is the relative path to <code>public</code> folder of the admin UI styles. These styles won't replace the defaults, they will be added.</li>
+				<li><b>cmd</b> must be surrounded by double quotes and it corresponds to the Hugo flags you want to use.</li>
+			</ul>
+
+			<p>
+				All of the directives above are optional.
+			</p>
+
+      <p>
+				To schedule a post, its <code>date</code> field must be in '2006-01-02 15:04:05-07:00' format.
+			</p>
+
+      <p>
+				This directive should be used with <a href="/docs/root">root</a>, <a href="/docs/basicauth">basicauth</a> and <a href="/docs/errors">errors</a> middleware to have the best experience. See the examples to know more.
+			</p>
+
+			<h3 id="examples">Examples</h3>
+
+			<p>
+				A simple configuration to use with Hugo static website generator:
+			</p>
+
+     		<code class="block"><span class="hl-directive">localhost:8080</span>  <span class="hl-comment"># website URL and port</span>
+
+<span class="hl-directive">root</span>      public           <span class="hl-comment"># the folder where Hugo generates the website</span>
+<span class="hl-directive">basicauth</span> /admin user pass <span class="hl-comment"># protect the admin area using HTTP basic auth</span>
+<span class="hl-directive">hugo</span>                       <span class="hl-comment"># enable the admin panel</span></code>
+
+			<footer>
+				&copy; 2015
+			</footer>
+		</main>
+
+		{{.Include "/includes/docs-nav.html"}}
+	</body>
+</html>