Documentation
¶
Index ¶
Constants ¶
View Source
const BlogRootFlagName = "root-path"
BlogRootFlagName is the CLI flag name for setting a blog root path.
View Source
const DisableReadingTimeFlagName = "disable-reading-time"
DisableReadingTimeFlagName is the CLI flag name for disabling reading time estimation.
View Source
const DisableTagsFlagName = "disable-tags"
DisableTagsFlagName is the CLI flag name for disabling tag page generation.
View Source
const HostFlagName = "host"
HostFlagName is the CLI flag name for setting the HTTP bind address.
View Source
const InputPostsDirArgName = "input-posts"
InputPostsDirArgName is the CLI argument name for the input posts directory.
View Source
const PortFlagName = "port"
PortFlagName is the CLI flag name for setting the HTTP listen port.
View Source
const TemplateDirFlagName = "template-dir"
TemplateDirFlagName is the CLI flag name for setting a template directory.
Variables ¶
View Source
var ServeCommand cli.Command = cli.Command{ Name: "serve", Aliases: []string{"s"}, Usage: "serve a blog from markdown posts over HTTP", Action: NewServeCommand, UseShortOptionHandling: true, Arguments: []cli.Argument{ &cli.StringArg{ Name: InputPostsDirArgName, UsageText: "<input directory>", }, }, Flags: []cli.Flag{ &cli.IntFlag{ Name: PortFlagName, Aliases: []string{"P"}, Usage: "port to listen on", Value: 8080, }, &cli.StringFlag{ Name: HostFlagName, Aliases: []string{"H"}, Usage: "host address to bind to", }, &cli.StringFlag{ Name: TemplateDirFlagName, Aliases: []string{"t"}, Usage: "directory of templates to use when rendering", }, &cli.StringFlag{ Name: BlogRootFlagName, Aliases: []string{"p"}, Usage: "root path of the blog, defaults to '/'", }, &cli.BoolFlag{ Name: DisableTagsFlagName, Aliases: []string{"T"}, Usage: "disable tag tracking and tag page generation", Value: false, }, &cli.BoolFlag{ Name: DisableReadingTimeFlagName, Usage: "disable reading time estimation on posts", Value: false, }, }, }
ServeCommand is the main entry point for the GoBlog serve CLI tool. This command sets up all the flags, usage info, and action for serve.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.