Documentation
¶
Index ¶
Constants ¶
const BlogRootFlagName = "root-path"
BlogRootFlagName is the CLI flag name for setting a blog root path
const DisableReadingTimeFlagName = "disable-reading-time"
DisableReadingTimeFlagName is the CLI flag name for disabling reading time estimation.
const DisableTagsFlagName = "disable-tags"
DisableTagsFlagName is the CLI flag name for disabling tag page generation.
const InputPostsDirArgName = "input-posts"
InputPostsDirArgName is the CLI argument name for the input posts directory.
const OutputDirArgName = "output-dir"
OutputDirArgName is the CLI argument name for the output directory.
const RawOutputFlagName = "raw"
RawOutputFlagName is the CLI flag name for enabling raw HTML output mode.
const TemplateDirFlagName = "template-dir"
TemplateDirArgName is the CLI flag name for setting a template directory
Variables ¶
var GeneratorCommand cli.Command = cli.Command{ Name: "generate", Aliases: []string{"g"}, Usage: "generate a static blog feed from markdown posts", Action: NewGeneratorCommand, UseShortOptionHandling: true, Arguments: []cli.Argument{ &cli.StringArg{ Name: InputPostsDirArgName, UsageText: "<input directory>", }, &cli.StringArg{ Name: OutputDirArgName, UsageText: "<output directory>", }, }, Flags: []cli.Flag{ &cli.BoolFlag{ Name: RawOutputFlagName, Aliases: []string{"r"}, Usage: "output raw HTML without template wrapper (skips tag pages and template rendering)", Value: false, }, &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, }, }, }
GeneratorCommand is the main entry point for the GoBlog generate CLI tool. This command is used to set up all the flags, usage info and the action to for generate.
Functions ¶
Types ¶
This section is empty.