aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md216
-rw-r--r--readme.html511
2 files changed, 635 insertions, 92 deletions
diff --git a/README.md b/README.md
index a791947..39ed1a0 100644
--- a/README.md
+++ b/README.md
@@ -1,74 +1,80 @@
-# snkt
-
-`snkt` is a static web site generator focused on simplicity and efficiency.
+<pre style="font-family: menlo, courier, monospace;">
+ ██
+ ██ ██
+ ██ ██
+ ▒█████░ ██░████ ██ ▓██▒ ███████
+ ████████ ███████▓ ██ ▓██▒ ███████
+ ██▒ ░▒█ ███ ▒██ ██▒██▒ ██
+ █████▓░ ██ ██ ████▓ ██
+ ░██████▒ ██ ██ █████ ██
+ ░▒▓██ ██ ██ ██░███ ██
+ █▒░ ▒██ ██ ██ ██ ██▒ ██░
+ ████████ ██ ██ ██ ▒██ █████
+ ░▓████▓ ██ ██ ██ ███ ░████
+
+
+ v.01 manual
+ 2/18/2018
+
+</pre>
-snkt only does a few things, but strives to do them well, in a coherent manner.
+# snkt
-snkt generates my [personal web site of ~2000 articles in under a second](https://trenchant.org/daily/2017/1/31/). Additional work may be done to increase efficiency, but it should be fast enough to regularly regenerate your site without concern in near real-time if needed.
+`snkt` is a static site generator focused on simplicity and efficiency.
-## What
+`snkt` does a few things, but strives to do them coherently.
-Takes a bunch of plain text files, processes them via templates, and generates HTML. Pretty much like you'd expect of a static site generator.
+`snkt` generates my [personal web site of ~2000 articles in under a second](https://trenchant.org/daily/2017/1/31/). It should be fast enough to completely regenerate even very large sites in near real-time if needed.
## Why
Every 5-10 years I throw out the software for my site and rewrite it.
-This time it's in Go. Maybe you'll find it useful.
-
-I found it fun to get myself thinking in Go. Also, it's 10x faster than the old version in Python.
+This time it's in Go. Maybe you'll find it useful. It's 10x faster than the old version in Python.
## Status
It powers [trenchant.org](https://trenchant.org) but is under active development and pieces may change. See TODO for future / in progress work.
-## Getting snkt
-
-[Install Go](https://golang.org/doc/install)
-
-Set up $GOPATH
-
- $ mkdir $HOME/go
- $ export GOPATH=$HOME/go
-
-See also: [The GOPATH environment variable](https://golang.org/doc/code.html#GOPATH)
+# Installation
-Add $GOPATH/bin to your PATH
+The only dependency for building is `go`.
- $ export PATH=$PATH:$GOPATH/bin
+[Install Go](https://golang.org/doc/install) for your platform.
-Download and build `snkt`
+Download and build `snkt` with something like
$ go get adammathes.com/snkt
-This should download depdendencies, build `snkt` and place it in $GOPATH/bin
+This will download dependencies, build `snkt` and place it in your $GOPATH/bin (by default, ~/go/bin/).
-`snkt` should now be a self-contained binary, you can move it if needed.
+`snkt` is a self-contained binary, you can move it anywhere.
-## Setting up a site
+# Quick Start
+
+## Creating a Site
Use the "-init" option to create the skeleton for a new site -
- $ snkt -init blogadu
+ $ snkt -i myblog
This will create:
- * `txt` directory for plain text input
+ * `txt` directory for posts
* `html` directory for HTML output
* `tmpl` directory for templates
- * `base` basic HTML structure for all pages
- * `post` single post page template
- * `home` - home page with recent posts template
- * `archive` - list all posts template
- * `rss` - template for an RSS 2.0 archive
- * `config.yml` -- configuration file
-
+ * `base` HTML structure wrapper
+ * `archive` lists all posts
+ * `post` single post page
+ * `home` home page with recent posts
+ * `rss` RSS 2.0
+ * `config.yml` configuration file
## First Post
A one line plaint text file is a valid post.
- user@host:~/blogadu$ echo "hello world" >> txt/hi
+ user@host:~/myblog$ echo "hello world" >> txt/hi
Build the site
@@ -82,31 +88,44 @@ Output should now be in the `html` directory and look like
* `archive.html`
* `rss.xml`
-Run a preview server to see the results with
+## Viewing the Results
+
+`snkt` includes a simple web server to view the results with
$ snkt -p
-Loading http://localhost:8000 in a web browser should now show the (near empty) site.
+Visiting http://localhost:8000 in a web browser should now show the site and the first post.
+
+You can now copy this HTML anywhere and you're set.
-## Command Line Usage
+# Command Line Options
```
Usage of snkt:
- -b build site
- -c configuration
+ -b, --build
+ generates site from input files and templates
+ -c, --config configuration
configuration file (default "config.yml")
- -h help
- -init directory
+ -h, --help
+ print usage information
+ -i, --init directory
initialize new site at directory
- -p preview site with local HTTP server
- -v print version number
- -verbose
- log actions during build
+ -s, --serve
+ serve site via integrated HTTP server
+ -v, --verbose
+ log operations during build to STDOUT
+ -w, --watch
+ watch configured input text dir, rebuild on changes
```
-## Configuration File
+Examples
-The configuration is in [YAML](http://yaml.org)
+ $ snkt -c site.yaml -b
+ $ snkt --config=myconfig.yml -v -w
+
+# Configuration
+
+Per site configuration is via a [YAML](http://yaml.org) file.
For most purposes, it should just be a listing of attribute : value
@@ -117,8 +136,8 @@ Configuration options --
| `input_dir` | absolute path of directory for text input files | |
| `output_dir` | absolute path of directory for html output files | |
| `tmpl_dir` | absolute path of directory for template files | |
-| `site_title` | string for the site's title (used in templates) | |
-| `site_url` | absolute URL for the site (used in templates) | |
+| `site_title` | string for the site's title | |
+| `site_url` | absolute URL for the site | |
| `filters` | list of search/replace regex's to run on posts | |
| `permalink_fmt` | format string for permalinks | /%F/ |
| `post_file_fmt` | format string for post filenames | /%F/index.html |
@@ -126,7 +145,7 @@ Configuration options --
| `preview_server` | host:port to spawn the preview server | localhost:8000 |
| `preview_dir` | root directory of preview server | `output_dir` |
-## Posts
+# Posts
Post inputs are stored as plain text files. (I have only tested UTF-8 and ASCII.)
@@ -151,27 +170,29 @@ Post with a preamble --
`totes` will be stored in the post's `meta` map under `valid.`
You don't have to worry about that right now. Honest.
-## Templates
+# Templates
Templates use the standard library [Go text/template](https://golang.org/pkg/text/template/).
-### Types
+Entities in the templates --
-#### Site (see site/site.go)
-```go
+**Site**
+```
Title string
URL string
- Posts post.Posts
+ Posts array of posts
```
-#### Post (see post/post.go)
+See site/site.go for more.
+
+**Post**
-```go
+```
// Metadata
Meta map[string]string
SourceFile string
- Title string `json:"title"`
- Permalink string `json:"permalink"`
+ Title string
+ Permalink string
Time time.Time
Year int
Month time.Month
@@ -195,51 +216,42 @@ Templates use the standard library [Go text/template](https://golang.org/pkg/tex
// Precomputed dates as strings
Date string
RssDate string
-
- FileInfo os.FileInfo
-
- Site sitemeta
```
-### home
+## home
-Displays recent posts. Rendered to `index.html`.
+Displays recent posts and rendered to `index.html` in the `output_dir`.
- {{.Site}} *Site*
-- {{.Posts}} *Posts* all posts on site, reverse chronological order
+- {{.Posts}} *Posts* all posts on site in reverse chronological order
-### post
+## post
-Template that gets rendered to create individual post pages
+Each individual post uses this template
- {{.Site}} *Site*
-- {{.Post}} *Post* the individual post the page is for
+- {{.Post}} *Post* the individual post
-### archive
+## archive
Lists all posts, showing only titles and links. Rendered to `archive.html`
- {{.Site}} *Site*
- {{.Posts}} *Posts* all posts, reverse chronological order
-### rss
+## rss
Displays recent posts as RSS 2.0 XML. Rendered to `rss.xml`
- {{.Site}} *Site*
- {{.Posts}} *Posts* all posts, reverse chronological order
-## Advanced Features
-
-### paged template
-If present renders paged archives (15 posts per page) to `page/%d.html`
+# Advanced Configuration Options
-See archive/paged.go for details. Used to create an "infinite scroll" style archive. Details/options/implementation may change.
+## Permalink and filename formatter
-### Permalink and filename formatter
-
-Permalink (URLs for individual posts) can be customized. This part is *meh* and subject to change.
+Permalinks (URLs for individual posts) can be customized.
| String | Value | Example |
|--------|----------|---------|
@@ -251,7 +263,8 @@ Permalink (URLs for individual posts) can be customized. This part is *meh* and
`Filename` is a cleaned version of the post's original filename with the extension removed. Filenames and titles will be "cleaned" of characters unsuitable for links, with whitespace replaced by `-`.
-### Filters
+
+## Filters
Arbitrary regular expressions can be executed on each post to create domain-specific and site-specific modifications.
@@ -269,7 +282,19 @@ filters:
r: "http://www.amazon.com/exec/obidos/ASIN/$1/decommodify-20/"
```
-### Tags
+# Work in Progress Features
+
+These features are working but less documented and potentially still in progress and subject to change.
+
+## Paged Archives
+
+If a template named `paged` is present then paged archives (15 posts per page) are created at `output_dir/page/%d.html`
+
+Template variables are the same as the `archive` template, but with `.NextPage` and `.PrevPage` as integers of the next and previous page.
+
+See archive/paged.go for details.
+
+## Tags
There is preliminary support for tag style metadata per post.
@@ -284,11 +309,15 @@ Tags will be normalized to lowercase, with spaces replaced with underscores. So
`tagone tag_two a_third_tag fourth`
-Tags are accessible in each post struct via the `Tags` field.
+Tags are accessible in each post via the `Tags` field.
-To create archives of tags, create a template named `tags` -- it will behave the same as an `archive` template, but create a file at HTML_DIR/tag/tag_name/index.html for each unique tag.
+To create pages by tag, create a template named `tags`.
-### Binary Files as Posts
+This creates a file at OUTPUT_DIR/tag/tag_name/index.html for each tag.
+
+It will have access to the same variables as an `archive` template with the additional `.Tag` for the tag name.
+
+## Binary Files as Posts
Preliminary support to treat binary files as standalone posts.
@@ -296,20 +325,23 @@ Drop image files with "jpg" or other image extensions into the "txt" dir.
* post's ContentType will be set to "image"
* text fields will be empty strings
-* metadata will be populated as it can via exif (sorta)
+* metadata will be populated as it can via exif (maybe)
-Video and audio files have preliminary support too -- see post.go
+Video and audio files have preliminary support too -- see `post/post.go`
-### Example configurations/sites/themes
+# Example configurations, sites, themes
*not done*
-### Auto-rebuild/deployment
+# Rebuild and deployment recipes
*also not done*
-## TODO
+# TODO
- * complete and document media support (image/mp3/video/binary file posts)
* sample sites/templates
* proper man pages for docs
+
+# Feedback
+
+Pull requests and issues are welcomed at https://github.com/adammathes/snkt
diff --git a/readme.html b/readme.html
new file mode 100644
index 0000000..11a3c7d
--- /dev/null
+++ b/readme.html
@@ -0,0 +1,511 @@
+<nav>
+<ul>
+<li><a href="#toc_0">snkt</a>
+<ul>
+<li><a href="#toc_1">Why</a></li>
+<li><a href="#toc_2">Status</a></li>
+</ul></li>
+<li><a href="#toc_3">Installation</a></li>
+<li><a href="#toc_4">Quick Start</a>
+<ul>
+<li><a href="#toc_5">Creating a Site</a></li>
+<li><a href="#toc_6">First Post</a></li>
+<li><a href="#toc_7">Viewing the Results</a></li>
+</ul></li>
+<li><a href="#toc_8">Command Line Options</a></li>
+<li><a href="#toc_9">Configuration</a></li>
+<li><a href="#toc_10">Posts</a></li>
+<li><a href="#toc_11">Templates</a>
+<ul>
+<li><a href="#toc_12">home</a></li>
+<li><a href="#toc_13">post</a></li>
+<li><a href="#toc_14">archive</a></li>
+<li><a href="#toc_15">rss</a></li>
+</ul></li>
+<li><a href="#toc_16">Advanced Configuration Options</a>
+<ul>
+<li><a href="#toc_17">Permalink and filename formatter</a></li>
+<li><a href="#toc_18">Filters</a></li>
+</ul></li>
+<li><a href="#toc_19">Work in Progress Features</a>
+<ul>
+<li><a href="#toc_20">Paged Archives</a></li>
+<li><a href="#toc_21">Tags</a></li>
+<li><a href="#toc_22">Binary Files as Posts</a></li>
+</ul></li>
+<li><a href="#toc_23">Example configurations, sites, themes</a></li>
+<li><a href="#toc_24">Rebuild and deployment recipes</a></li>
+<li><a href="#toc_25">TODO</a></li>
+<li><a href="#toc_26">Feedback</a></li>
+</ul>
+</nav>
+
+<pre style="font-family: menlo, courier, monospace;">
+ ██
+ ██ ██
+ ██ ██
+ ▒█████░ ██░████ ██ ▓██▒ ███████
+ ████████ ███████▓ ██ ▓██▒ ███████
+ ██▒ ░▒█ ███ ▒██ ██▒██▒ ██
+ █████▓░ ██ ██ ████▓ ██
+ ░██████▒ ██ ██ █████ ██
+ ░▒▓██ ██ ██ ██░███ ██
+ █▒░ ▒██ ██ ██ ██ ██▒ ██░
+ ████████ ██ ██ ██ ▒██ █████
+ ░▓████▓ ██ ██ ██ ███ ░████
+
+
+ v.01 manual
+ 2/18/2018
+
+</pre>
+
+<h1 id="toc_0">snkt</h1>
+
+<p><code>snkt</code> is a static site generator focused on simplicity and efficiency.</p>
+
+<p><code>snkt</code> does a few things, but strives to do them coherently.</p>
+
+<p><code>snkt</code> generates my <a href="https://trenchant.org/daily/2017/1/31/">personal web site of ~2000 articles in under a second</a>. It should be fast enough to completely regenerate even very large sites in near real-time if needed.</p>
+
+<h2 id="toc_1">Why</h2>
+
+<p>Every 5-10 years I throw out the software for my site and rewrite it.</p>
+
+<p>This time it&rsquo;s in Go. Maybe you&rsquo;ll find it useful. It&rsquo;s 10x faster than the old version in Python.</p>
+
+<h2 id="toc_2">Status</h2>
+
+<p>It powers <a href="https://trenchant.org">trenchant.org</a> but is under active development and pieces may change. See TODO for future / in progress work.</p>
+
+<h1 id="toc_3">Installation</h1>
+
+<p>The only dependency for building is <code>go</code>.</p>
+
+<p><a href="https://golang.org/doc/install">Install Go</a> for your platform.</p>
+
+<p>Download and build <code>snkt</code> with something like</p>
+
+<pre><code>$ go get adammathes.com/snkt
+</code></pre>
+
+<p>This will download dependencies, build <code>snkt</code> and place it in your $GOPATH/bin (by default, ~/go/bin/).</p>
+
+<p><code>snkt</code> is a self-contained binary, you can move it anywhere.</p>
+
+<h1 id="toc_4">Quick Start</h1>
+
+<h2 id="toc_5">Creating a Site</h2>
+
+<p>Use the &ldquo;-init&rdquo; option to create the skeleton for a new site -</p>
+
+<pre><code>$ snkt -i myblog
+</code></pre>
+
+<p>This will create:</p>
+
+<ul>
+<li><code>txt</code> directory for posts</li>
+<li><code>html</code> directory for HTML output</li>
+<li><code>tmpl</code> directory for templates
+
+<ul>
+<li><code>base</code> HTML structure wrapper</li>
+<li><code>archive</code> lists all posts</li>
+<li><code>post</code> single post page</li>
+<li><code>home</code> home page with recent posts</li>
+<li><code>rss</code> RSS 2.0</li>
+</ul></li>
+<li><code>config.yml</code> configuration file</li>
+</ul>
+
+<h2 id="toc_6">First Post</h2>
+
+<p>A one line plaint text file is a valid post.</p>
+
+<pre><code>user@host:~/myblog$ echo &quot;hello world&quot; &gt;&gt; txt/hi
+</code></pre>
+
+<p>Build the site</p>
+
+<pre><code>$ snkt -b
+</code></pre>
+
+<p>Output should now be in the <code>html</code> directory and look like</p>
+
+<ul>
+<li><code>html</code>
+
+<ul>
+<li><code>hi/index.html</code> hello world post</li>
+<li><code>index.html</code></li>
+<li><code>archive.html</code></li>
+<li><code>rss.xml</code></li>
+</ul></li>
+</ul>
+
+<h2 id="toc_7">Viewing the Results</h2>
+
+<p><code>snkt</code> includes a simple web server to view the results with</p>
+
+<pre><code>$ snkt -p
+</code></pre>
+
+<p>Visiting <a href="http://localhost:8000">http://localhost:8000</a> in a web browser should now show the site and the first post.</p>
+
+<p>You can now copy this HTML anywhere and you&rsquo;re set.</p>
+
+<h1 id="toc_8">Command Line Options</h1>
+
+<pre><code>Usage of snkt:
+ -b, --build
+ generates site from input files and templates
+ -c, --config configuration
+ configuration file (default &quot;config.yml&quot;)
+ -h, --help
+ print usage information
+ -i, --init directory
+ initialize new site at directory
+ -s, --serve
+ serve site via integrated HTTP server
+ -v, --verbose
+ log operations during build to STDOUT
+ -w, --watch
+ watch configured input text dir, rebuild on changes
+</code></pre>
+
+<p>Examples</p>
+
+<pre><code>$ snkt -c site.yaml -b
+$ snkt --config=myconfig.yml -v -w
+</code></pre>
+
+<h1 id="toc_9">Configuration</h1>
+
+<p>Per site configuration is via a <a href="http://yaml.org">YAML</a> file.</p>
+
+<p>For most purposes, it should just be a listing of attribute : value</p>
+
+<p>Configuration options --</p>
+
+<table>
+<thead>
+<tr>
+<th>name</th>
+<th>value</th>
+<th>default</th>
+</tr>
+</thead>
+
+<tbody>
+<tr>
+<td><code>input_dir</code></td>
+<td>absolute path of directory for text input files</td>
+<td></td>
+</tr>
+
+<tr>
+<td><code>output_dir</code></td>
+<td>absolute path of directory for html output files</td>
+<td></td>
+</tr>
+
+<tr>
+<td><code>tmpl_dir</code></td>
+<td>absolute path of directory for template files</td>
+<td></td>
+</tr>
+
+<tr>
+<td><code>site_title</code></td>
+<td>string for the site&rsquo;s title</td>
+<td></td>
+</tr>
+
+<tr>
+<td><code>site_url</code></td>
+<td>absolute URL for the site</td>
+<td></td>
+</tr>
+
+<tr>
+<td><code>filters</code></td>
+<td>list of search/replace regex&rsquo;s to run on posts</td>
+<td></td>
+</tr>
+
+<tr>
+<td><code>permalink_fmt</code></td>
+<td>format string for permalinks</td>
+<td>/%F/</td>
+</tr>
+
+<tr>
+<td><code>post_file_fmt</code></td>
+<td>format string for post filenames</td>
+<td>/%F/index.html</td>
+</tr>
+
+<tr>
+<td><code>show_future</code></td>
+<td>include posts with dates in the future</td>
+<td>false</td>
+</tr>
+
+<tr>
+<td><code>preview_server</code></td>
+<td>host:port to spawn the preview server</td>
+<td>localhost:8000</td>
+</tr>
+
+<tr>
+<td><code>preview_dir</code></td>
+<td>root directory of preview server</td>
+<td><code>output_dir</code></td>
+</tr>
+</tbody>
+</table>
+
+<h1 id="toc_10">Posts</h1>
+
+<p>Post inputs are stored as plain text files. (I have only tested UTF-8 and ASCII.)</p>
+
+<p>Posts have an optional metadata preamble, and a markdown formatted body. The preamble is just a series of name value pairings separated by a colon (:) character.</p>
+
+<p>Minimal complete and valid post --</p>
+
+<pre><code>this is a totally valid post
+</code></pre>
+
+<p>Post with a preamble --</p>
+
+<pre><code>title: also a valid post
+date: 2017-02-08
+valid: totes
+
+This post will have an explicitly set title (ooh! fancy!)
+instead of inferred from the filename.
+
+It will also have an explicitly set date instead of inferring
+it from the file creation/modification time.
+
+`totes` will be stored in the post's `meta` map under `valid.`
+You don't have to worry about that right now. Honest.
+</code></pre>
+
+<h1 id="toc_11">Templates</h1>
+
+<p>Templates use the standard library <a href="https://golang.org/pkg/text/template/">Go text/template</a>.</p>
+
+<p>Entities in the templates --</p>
+
+<p><strong>Site</strong></p>
+
+<pre><code> Title string
+ URL string
+ Posts array of posts
+</code></pre>
+
+<p>See site/site.go for more.</p>
+
+<p><strong>Post</strong></p>
+
+<pre><code> // Metadata
+ Meta map[string]string
+ SourceFile string
+ Title string
+ Permalink string
+ Time time.Time
+ Year int
+ Month time.Month
+ Day int
+ InFuture bool
+
+ // Content text -- raw, unprocessed, unfiltered markdown
+ Text string
+
+ // Content text -- processed into HTML via markdown and other filters
+ Content string
+
+ // Content with sources and references resolved to absolute URLs
+ AbsoluteContent string
+
+ // Post following chronologically (later)
+ Next *Post
+ // Post preceding chronologically (earlier)
+ Prev *Post
+
+ // Precomputed dates as strings
+ Date string
+ RssDate string
+</code></pre>
+
+<h2 id="toc_12">home</h2>
+
+<p>Displays recent posts and rendered to <code>index.html</code> in the <code>output_dir</code>.</p>
+
+<ul>
+<li>{{.Site}} <em>Site</em></li>
+<li>{{.Posts}} <em>Posts</em> all posts on site in reverse chronological order</li>
+</ul>
+
+<h2 id="toc_13">post</h2>
+
+<p>Each individual post uses this template</p>
+
+<ul>
+<li>{{.Site}} <em>Site</em></li>
+<li>{{.Post}} <em>Post</em> the individual post</li>
+</ul>
+
+<h2 id="toc_14">archive</h2>
+
+<p>Lists all posts, showing only titles and links. Rendered to <code>archive.html</code></p>
+
+<ul>
+<li>{{.Site}} <em>Site</em></li>
+<li>{{.Posts}} <em>Posts</em> all posts, reverse chronological order</li>
+</ul>
+
+<h2 id="toc_15">rss</h2>
+
+<p>Displays recent posts as RSS 2.0 XML. Rendered to <code>rss.xml</code></p>
+
+<ul>
+<li>{{.Site}} <em>Site</em></li>
+<li>{{.Posts}} <em>Posts</em> all posts, reverse chronological order</li>
+</ul>
+
+<h1 id="toc_16">Advanced Configuration Options</h1>
+
+<h2 id="toc_17">Permalink and filename formatter</h2>
+
+<p>Permalinks (URLs for individual posts) can be customized.</p>
+
+<table>
+<thead>
+<tr>
+<th>String</th>
+<th>Value</th>
+<th>Example</th>
+</tr>
+</thead>
+
+<tbody>
+<tr>
+<td>%Y</td>
+<td>Year</td>
+<td>2017</td>
+</tr>
+
+<tr>
+<td>%M</td>
+<td>Month</td>
+<td>04</td>
+</tr>
+
+<tr>
+<td>%D</td>
+<td>Day</td>
+<td>14</td>
+</tr>
+
+<tr>
+<td>%F</td>
+<td>Filename</td>
+<td>foo</td>
+</tr>
+
+<tr>
+<td>%T</td>
+<td>Title</td>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+
+<p><code>Filename</code> is a cleaned version of the post&rsquo;s original filename with the extension removed. Filenames and titles will be &ldquo;cleaned&rdquo; of characters unsuitable for links, with whitespace replaced by <code>-</code>.</p>
+
+<h2 id="toc_18">Filters</h2>
+
+<p>Arbitrary regular expressions can be executed on each post to create domain-specific and site-specific modifications.</p>
+
+<p>Here are the real world examples of regular expressions that filter each post on my personal site -</p>
+
+<pre><code class="language-yaml">filters:
+ - s: &lt;photo id=&quot;(.+)&quot;&gt;
+ r: &lt;div class=&quot;photo&quot;&gt;&lt;img src=&quot;/img/$1&quot; /&gt;&lt;/div&gt;
+ - s: &lt;segue /&gt;
+ r: &lt;p class=&quot;segue&quot;&gt;&amp;middot; &amp;middot; &amp;middot;&lt;/p&gt;
+ - s: &lt;youtube id=&quot;(.+)&quot;&gt;
+ r: &lt;p class=&quot;video&quot;&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=$1&quot;&gt;&lt;img src=&quot;/img/$1.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
+ - s: &quot;amazon:(.+)&quot;
+ r: &quot;http://www.amazon.com/exec/obidos/ASIN/$1/decommodify-20/&quot;
+</code></pre>
+
+<h1 id="toc_19">Work in Progress Features</h1>
+
+<p>These features are working but less documented and potentially still in progress and subject to change.</p>
+
+<h2 id="toc_20">Paged Archives</h2>
+
+<p>If a template named <code>paged</code> is present then paged archives (15 posts per page) are created at <code>output_dir/page/%d.html</code></p>
+
+<p>Template variables are the same as the <code>archive</code> template, but with <code>.NextPage</code> and <code>.PrevPage</code> as integers of the next and previous page.</p>
+
+<p>See archive/paged.go for details.</p>
+
+<h2 id="toc_21">Tags</h2>
+
+<p>There is preliminary support for tag style metadata per post.</p>
+
+<p>Add a &ldquo;tags&rdquo; field to your post preamble. Tags should be comma separated.</p>
+
+<pre><code> tags: TagOne, tag two, a third tag, fourth
+
+</code></pre>
+
+<p>Tags will be normalized to lowercase, with spaces replaced with underscores. So the above would have tagged a post with --</p>
+
+<p><code>tagone tag_two a_third_tag fourth</code></p>
+
+<p>Tags are accessible in each post via the <code>Tags</code> field.</p>
+
+<p>To create pages by tag, create a template named <code>tags</code>.</p>
+
+<p>This creates a file at OUTPUT_DIR/tag/tag_name/index.html for each tag.</p>
+
+<p>It will have access to the same variables as an <code>archive</code> template with the additional <code>.Tag</code> for the tag name.</p>
+
+<h2 id="toc_22">Binary Files as Posts</h2>
+
+<p>Preliminary support to treat binary files as standalone posts.</p>
+
+<p>Drop image files with &ldquo;jpg&rdquo; or other image extensions into the &ldquo;txt&rdquo; dir.</p>
+
+<ul>
+<li>post&rsquo;s ContentType will be set to &ldquo;image&rdquo;</li>
+<li>text fields will be empty strings</li>
+<li>metadata will be populated as it can via exif (maybe)</li>
+</ul>
+
+<p>Video and audio files have preliminary support too -- see <code>post/post.go</code></p>
+
+<h1 id="toc_23">Example configurations, sites, themes</h1>
+
+<p><em>not done</em></p>
+
+<h1 id="toc_24">Rebuild and deployment recipes</h1>
+
+<p><em>also not done</em></p>
+
+<h1 id="toc_25">TODO</h1>
+
+<ul>
+<li>sample sites/templates</li>
+<li>proper man pages for docs</li>
+</ul>
+
+<h1 id="toc_26">Feedback</h1>
+
+<p>Pull requests and issues are welcomed at <a href="https://github.com/adammathes/snkt">https://github.com/adammathes/snkt</a></p>