fix basic sample
This commit is contained in:
parent
5377984d21
commit
32d3e56338
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
dst
|
build
|
||||||
|
cache
|
||||||
|
@ -13,12 +13,12 @@ import (
|
|||||||
|
|
||||||
type builder struct{}
|
type builder struct{}
|
||||||
|
|
||||||
func (b *builder) Build(srcDir, dstDir string) {
|
func (b *builder) Build(contentDir, buildDir, cacheDir string) {
|
||||||
errs := goldsmith.Begin(srcDir).
|
errs := goldsmith.Begin(contentDir).
|
||||||
Chain(frontmatter.New()).
|
Chain(frontmatter.New()).
|
||||||
Chain(markdown.New()).
|
Chain(markdown.New()).
|
||||||
Chain(layout.New("layouts/*.html")).
|
Chain(layout.New()).
|
||||||
End(dstDir)
|
End(buildDir)
|
||||||
|
|
||||||
for _, err := range errs {
|
for _, err := range errs {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
@ -26,10 +26,8 @@ func (b *builder) Build(srcDir, dstDir string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var (
|
port := flag.Int("port", 8080, "server port")
|
||||||
dst = flag.String("dst", "dst", "destination directory")
|
|
||||||
port = flag.Int("port", 8080, "server port")
|
|
||||||
)
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
devserver.DevServe(new(builder), *port, "src", *dst, "layouts")
|
|
||||||
|
devserver.DevServe(new(builder), *port, "content", "build", "cache")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user