diff --git a/tools/gostatic/BUILD b/tools/gostatic/BUILD
new file mode 100644
index 00000000..13a250dd
--- /dev/null
+++ b/tools/gostatic/BUILD
@@ -0,0 +1,8 @@
+load("//bzl:rules.bzl", "copy_go_binary")
+
+copy_go_binary(
+ name = "gostatic",
+ src = "@com_github_piranha_gostatic//:gostatic",
+ visibility = ["//visibility:public"],
+)
+
diff --git a/tools/gostatic/README.md b/tools/gostatic/README.md
new file mode 100644
index 00000000..6c0f17c6
--- /dev/null
+++ b/tools/gostatic/README.md
@@ -0,0 +1,43 @@
+gostatic site generator
+=======================
+
+This implements support for [gostatic](https://github.com/piranha/gostatic), a static site generator, inside hscloud.
+
+Creating a gostatic site
+------------------------
+
+To get started, copy over the skeleton from //tools/gostatic/example into a new directory.
+
+ mkdir -p personal/foo
+ cp -rv tools/gostatic/example personal/foo/mysite
+
+You can also build your own `gostatic_tarball` from scratch if you are familiar enough with gostatic.
+
+You can then then build a tarball of your site by running:
+
+ bazel build //personal/foo/mysite
+
+Your site will be built and tarred up into `bazel-bin/personal/foo/mysite/mysite.tar`. You can then use this to populate a container in `docker_rules`.
+
+TODO(q3k): add a target that starts up a simple web server for testing the rendered site.
+
+Configuring a gostatic site
+---------------------------
+
+Configuration is done via the `gostatic_tarball` rule. This mostly generates an upstream gostatic [configuration file](https://github.com/piranha/gostatic#configuration) - please refer to that file for more information.
+
+| Field | Description | Example |
+|-------|-------------|---------|
+| `templates` | List of template sources/targets. This is used to populate the TEMPLATES config option. | `[ ":site.tmpl" ]` |
+| `source_dir` | BUILDfile-relative source directory containing site sources. This is used to populate the SOURCE config option. All files given in `srcs` must be contained within this directory. | `"src"` |
+| `srcs` | List of template sources/targets. This is what will be available to gostatic during compilation. | `[ "src/blog/first.md" ]` |
+| `extra_config` | Rest of the gostatic config, ie. rules. | |
+
+Running gostatic-the-tool
+-------------------------
+
+If you want to run plain gostatic for some odd reason, it's available under:
+
+ bazel run //tools/gostatic
+
+TODO(q3k): allow running this against a `gostatic_tarball`'s config.
diff --git a/tools/gostatic/example/BUILD b/tools/gostatic/example/BUILD
new file mode 100644
index 00000000..cb54fec6
--- /dev/null
+++ b/tools/gostatic/example/BUILD
@@ -0,0 +1,45 @@
+load("//tools/gostatic:rules.bzl", "gostatic_tarball")
+
+gostatic_tarball(
+ name = "example",
+ templates = [
+ "site.tmpl",
+ ],
+ source_dir = "src",
+ extra_config = """
+TITLE = Example Site
+URL = https://example.com
+AUTHOR = Your Name
+
+blog/*.md:
+ config
+ ext .html
+ directorify
+ tags tags/*.tag
+ markdown
+ template post
+ template page
+
+*.tag: blog/*.md
+ ext .html
+ directorify
+ template tag
+ markdown
+ template page
+
+blog.atom: blog/*.md
+ inner-template
+
+index.html: blog/*.md
+ config
+ inner-template
+ template page
+
+ """,
+ srcs = [
+ "src/blog/first.md",
+ "src/static/style.css",
+ "src/blog.atom",
+ "src/index.html",
+ ],
+)
diff --git a/tools/gostatic/example/site.tmpl b/tools/gostatic/example/site.tmpl
new file mode 100644
index 00000000..8878ab2c
--- /dev/null
+++ b/tools/gostatic/example/site.tmpl
@@ -0,0 +1,50 @@
+{{ define "header" }}
+
+