Browse files

add gostatic

  • Loading branch information...
1 parent 0675561 commit 12c9bfd474ebcb78678a7ef47d60ed9b46e7034a @piranha piranha committed May 27, 2013
View
2 .gitignore
@@ -15,3 +15,5 @@ webgen/out/*
webgen/webgen.cache
wintersmith/build/*
+
+gostatic/site/
View
5 gostatic/Makefile
@@ -0,0 +1,5 @@
+build:
+ gostatic config
+
+clean:
+ rm -rf site
View
16 gostatic/config
@@ -0,0 +1,16 @@
+# -*- mode: makefile -*-
+
+TEMPLATES = site.tmpl
+SOURCE = src
+OUTPUT = site
+
+index.html:
+ config
+ markdown
+ inner-template
+ template page
+
+about.html:
+ config
+ markdown
+ template about
View
38 gostatic/site.tmpl
@@ -0,0 +1,38 @@
+{{ define "header" }}<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ {{ if .Title }}
+ <title>{{ html .Title }}</title>
+ {{ else }}
+ <title>Untitled Page</title>
+ {{ end }}
+ </head>
+ <body>
+{{ end }}
+
+{{ define "footer" }}
+ </body>
+</html>
+{{ end }}
+
+{{ define "page" }}{{ template "header" . }}
+{{ .Content }}
+{{ template "footer" }}
+{{ end }}
+
+{{ define "about" }}{{ template "header" . }}
+ <table width="100%">
+ <tr>
+ <td valign="top" width="20%">
+ <ul>
+ <li>Free Software.</li>
+ <li>Cake.</li>
+ </ul>
+ </td>
+ <td valign="top">
+{{ .Content }}
+ </td></tr>
+ </table>
+{{ template "footer" }}
+{{ end }}
View
4 gostatic/src/about.html
@@ -0,0 +1,4 @@
+title: About my site
+----
+<p>This is my about page.</p>
+<p>The layout is different to the <a href="index.html">index page</a>.</p>
View
8 gostatic/src/index.html
@@ -0,0 +1,8 @@
+title: Welcome!
+location: Edinburgh
+----
+<p>Welcome to my site. We too have per-page variables:</p>
+<pre>
+I am in {{ .Other.Location }}
+</pre>
+<p>If you look at the <a href="about.html">about page</a> you'll see a different layout.</p>
View
1 gostatic/src/jquery
View
9,472 gostatic/src/jquery-1.8.3/jquery-1.8.3.js
9,472 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1 gostatic/src/jquery-1.8.3/jquery.js

0 comments on commit 12c9bfd

Please sign in to comment.