diff --git a/.gitignore b/.gitignore index c419571..ab307b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -dst +build +cache diff --git a/basic/src/index.md b/basic/content/index.md similarity index 100% rename from basic/src/index.md rename to basic/content/index.md diff --git a/basic/layouts/basic.html b/basic/content/layouts/basic.gohtml similarity index 100% rename from basic/layouts/basic.html rename to basic/content/layouts/basic.gohtml diff --git a/basic/main.go b/basic/main.go index 3188487..f1d02f2 100644 --- a/basic/main.go +++ b/basic/main.go @@ -13,12 +13,12 @@ import ( type builder struct{} -func (b *builder) Build(srcDir, dstDir string) { - errs := goldsmith.Begin(srcDir). +func (b *builder) Build(contentDir, buildDir, cacheDir string) { + errs := goldsmith.Begin(contentDir). Chain(frontmatter.New()). Chain(markdown.New()). - Chain(layout.New("layouts/*.html")). - End(dstDir) + Chain(layout.New()). + End(buildDir) for _, err := range errs { log.Print(err) @@ -26,10 +26,8 @@ func (b *builder) Build(srcDir, dstDir string) { } func main() { - var ( - dst = flag.String("dst", "dst", "destination directory") - port = flag.Int("port", 8080, "server port") - ) + port := flag.Int("port", 8080, "server port") flag.Parse() - devserver.DevServe(new(builder), *port, "src", *dst, "layouts") + + devserver.DevServe(new(builder), *port, "content", "build", "cache") }