Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Build = cli.Command{ Name: "build", ShortName: "b", Usage: "build pugo.static website", Flags: append(commonFlags, cli.BoolFlag{ Name: "clean", Usage: "clean files in destination dir but not compiled by PuGo", }), Action: func(ctx *cli.Context) error { if ctx.Bool("debug") { mylog.EnableTrace = true } build.Build(ctx.Bool("clean")) return nil }, }
Build is build command , use to build contents to webpages
View Source
var Server = cli.Command{ Name: "server", Usage: "run http server to serve compiled files", ShortName: "srv", Flags: append(commonFlags, cli.BoolFlag{ Name: "static", Usage: "only serve static directory, do not build", }, cli.BoolFlag{ Name: "clean", Usage: "clean files in destination dir but not compiled by PuGo", }, cli.StringFlag{ Name: "addr", Usage: "run http server on this address", Value: "0.0.0.0:9899", }), Action: func(ctx *cli.Context) error { if !ctx.Bool("static") { if ctx.Bool("debug") { mylog.EnableTrace = true } if !build.Build(ctx.Bool("clean")) { return nil } } build.Server(ctx.String("addr")) return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.