.
This commit is contained in:
parent
1acd184562
commit
9f2737cb96
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/FooSoft/goldsmith"
|
"github.com/FooSoft/goldsmith"
|
||||||
@ -25,5 +26,7 @@ func (b *builder) Build(srcDir, dstDir string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
devserver.DevServe(new(builder), 8080, "src", "dst", "layouts")
|
port := flag.Int("port", 8080, "server port")
|
||||||
|
flag.Parse()
|
||||||
|
devserver.DevServe(new(builder), *port, "src", "dst", "layouts")
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,10 @@ import (
|
|||||||
|
|
||||||
"github.com/FooSoft/goldsmith"
|
"github.com/FooSoft/goldsmith"
|
||||||
"github.com/FooSoft/goldsmith-components/devserver"
|
"github.com/FooSoft/goldsmith-components/devserver"
|
||||||
|
"github.com/FooSoft/goldsmith-components/filters/condition"
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/abs"
|
"github.com/FooSoft/goldsmith-components/plugins/abs"
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/breadcrumbs"
|
"github.com/FooSoft/goldsmith-components/plugins/breadcrumbs"
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/collection"
|
"github.com/FooSoft/goldsmith-components/plugins/collection"
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/condition"
|
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/dom"
|
"github.com/FooSoft/goldsmith-components/plugins/dom"
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/frontmatter"
|
"github.com/FooSoft/goldsmith-components/plugins/frontmatter"
|
||||||
"github.com/FooSoft/goldsmith-components/plugins/index"
|
"github.com/FooSoft/goldsmith-components/plugins/index"
|
||||||
@ -85,7 +85,9 @@ func (b *builder) Build(srcDir, dstDir string) {
|
|||||||
Chain(syntax.New().Placement(syntax.PlaceInline)).
|
Chain(syntax.New().Placement(syntax.PlaceInline)).
|
||||||
Chain(dom.New(fixup)).
|
Chain(dom.New(fixup)).
|
||||||
Chain(thumbnail.New()).
|
Chain(thumbnail.New()).
|
||||||
Chain(condition.If(len(b.root) > 0, abs.New().BaseUrl(b.root))).
|
FilterPush(condition.If(len(b.root) > 0)).
|
||||||
|
Chain(abs.New().BaseUrl(b.root)).
|
||||||
|
FilterPop().
|
||||||
End(dstDir)
|
End(dstDir)
|
||||||
|
|
||||||
for _, err := range errs {
|
for _, err := range errs {
|
||||||
|
Loading…
Reference in New Issue
Block a user