The crash was introduced by commit 00d04774 in PR #1652
where access to NoTimes was attempted even though --noTimes
was not defined for the config, check and benchmark commands.
Special thanks to @bep for the heads-up!
See also #1624 - CLI UX: Flags shouldn't be global
This is to ensure that only the relevant command-line flags
for a certain Hugo subcommand is shown to the end user,
reducing clutter and improving user experience.
Fixes#1624 - CLI UX: Flags shouldn't be global
The `gh` shortcode has two modes: users and issues. For user mode, pass a list
of `@username` arguments. For the issues/PR mode, pass a list of issue or PR
numbers. PRs link to the "issues/" URL since Github redirects to the correct
URL.
Thanks to @ryanclarke for suggesting an improved template.
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.
This commit introduces that by changing all the command funcs to `RunE`:
* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)
Fixes#1502
Hugo command provides "noTimes" flag but it doesn't affect synced files
timestamp regardless of whether the flag is specified or not.
This fixes it by adding a flag check and overwriting configuration if it
is specified.
Fix#1583
Hugo command doesn't copy site's "static" directory files to "public"
directory if a specified theme doesn't have "static" directory because
theme's "static" directory checking always returns an error.
This fixes it by just showing a warning message about theme's "static"
directory absence and not skipping following processes.
Fix#1655
Also add a note saying that these blackfriday flags are
very case-sensitive as of Hugo v0.15.
Thanks to @ryanclarke for noticing the change in behaviour.
See also spf13/hugo@5838420