hswaw/site: serve static
This adds a minimum serving Go binary, and static/template file
embedding.
The templates are not yet served or even loaded. The static files are
served at /static/..., eg.:
$ curl 127.0.0.1:8080/static/mapka.png
Change-Id: Iedd8696db2c2e5d434dc2e7fbd0199d0f6ee5fff
diff --git a/hswaw/site/templates/BUILD.bazel b/hswaw/site/templates/BUILD.bazel
new file mode 100644
index 0000000..58da1ea
--- /dev/null
+++ b/hswaw/site/templates/BUILD.bazel
@@ -0,0 +1,25 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data")
+
+go_embed_data(
+ name = "templates",
+ srcs = [
+ "about.html",
+ "about_en.html",
+ "basic.html",
+ "header.html",
+ "main.html",
+ "rotimate_at.html",
+ "subscribe.html",
+ "subscribe_en.html",
+ ],
+ package = "templates",
+)
+
+# keep
+go_library(
+ name = "templates_go",
+ srcs = [":templates"],
+ importpath = "code.hackerspace.pl/hscloud/hswaw/site/templates",
+ visibility = ["//visibility:public"],
+)