diff --git a/main.go b/main.go index 6cdc6b5..1ee3fea 100644 --- a/main.go +++ b/main.go @@ -259,7 +259,7 @@ var VarCmd = &cobra.Command{ Short: "Display variables for the specified file", Long: `The var command extracts and display sll teh variables defined in a file. If the name of variables (optional) are passed as additional arguments, only those variables -are display instead of all variables (the default behavior).`, +are display instead of all variables (the default behaviors).`, Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { s := "" @@ -589,9 +589,8 @@ func build(path string, w io.Writer, vars Vars) error { return buildMarkdown(path, w, vars) } else if ext == ".html" || ext == ".xml" { return buildHTML(path, w, vars) - } else { - return buildRaw(path, w) } + return buildRaw(path, w) } func buildAll(ctx context.Context, watch bool) error { @@ -700,6 +699,8 @@ func serve(ctx context.Context, bind, root string) error { return err } + log.Infof("zs %s server listening on %s", ShortVersion(), bind) + go svr.Run(ctx) go buildAll(ctx, true) diff --git a/version.go b/version.go index c8d3735..333562f 100644 --- a/version.go +++ b/version.go @@ -48,3 +48,8 @@ func FullVersion() string { return sb.String() } + +// ShortVersion display the short version and build +func ShortVersion() string { + return fmt.Sprintf("%s@%s", Version, Commit) +}