diff --git a/template/chapter.tmpl b/template/chapter.tmpl
index 28f65ee..ae60843 100644
--- a/template/chapter.tmpl
+++ b/template/chapter.tmpl
@@ -3,7 +3,7 @@
diff --git a/template/index.tmpl b/template/index.tmpl
index 0d44024..dedb76d 100644
--- a/template/index.tmpl
+++ b/template/index.tmpl
@@ -3,7 +3,7 @@
Go by Example
-
+
diff --git a/tool/generate.go b/tool/generate.go
index 7639167..913392f 100644
--- a/tool/generate.go
+++ b/tool/generate.go
@@ -28,6 +28,15 @@ func ensureDir(dir string) {
check(err)
}
+func copyFile(src, dst string) {
+ srcF, err := os.Open(src, os.O_RDONLY, 0)
+ check(err)
+ dstF, err := os.Create(dst)
+ check(err)
+ err = io.Copy(srcF, dstF)
+ check(err)
+}
+
func pipe(bin string, arg []string, src string) []byte {
cmd := exec.Command(bin, arg...)
in, _ := cmd.StdinPipe()
@@ -222,6 +231,7 @@ func renderChapters(chapters []*Chapter) {
func main() {
ensureDir(siteDir)
+ copyFile("template/site.css", siteDir+"/site.css")
chapters := parseChapters()
renderIndex(chapters)
renderChapters(chapters)