summaryrefslogtreecommitdiffstats
path: root/commands/commandeer.go
AgeCommit message (Collapse)Author
2023-05-28commands: Add the common build flags to the config commandsBjørn Erik Pedersen
Which allows to see the config with `--theme` applied. Updates #11018
2023-05-28commands: Reinstate some of the removed build flags (e.g. --theme) to new ↵Bjørn Erik Pedersen
and mod Fixes #11018
2023-05-27commands: Move the --format flag to only the commands that support itBjørn Erik Pedersen
Fixes #11022
2023-05-24Fix regression with site.IsServer when not running a serverBjørn Erik Pedersen
Fixes #11006
2023-05-22Add --format to hugo configBjørn Erik Pedersen
Now default to TOML.
2023-05-22Add cache busting config to support Tailwind 3Bjørn Erik Pedersen
Fixes #10974
2023-05-19commands: Fix data raceBjørn Erik Pedersen
By wrapping all use of the shared config in a lock. Updates #10953
2023-05-19Re-add --printUnusedTemplates and --printPathWarningsBjørn Erik Pedersen
And now with tests. Updates #10953
2023-05-18Make GOMAXPROCS to be CPU limit aware Benjamin Elder
Fixes #10950
2023-05-18commands: Load config before creating the filesystemBjørn Erik Pedersen
To allow publishDir to be set in config file.
2023-05-18Fix some recently introduced error handling issuesBjørn Erik Pedersen
Updates #10953
2023-05-17commands: Improve the common build flag handlingBjørn Erik Pedersen
Updates #10947
2023-05-17Re-establish all the server flagsBjørn Erik Pedersen
Updates #10947
2023-05-16Create a struct with all of Hugo's config optionsBjørn Erik Pedersen
Primary motivation is documentation, but it will also hopefully simplify the code. Also, * Lower case the default output format names; this is in line with the custom ones (map keys) and how it's treated all the places. This avoids doing `stringds.EqualFold` everywhere. Closes #10896 Closes #10620
2023-03-14commands: Fix data race in testBjørn Erik Pedersen
Note that this is a test fix only.
2023-03-01Replace deprecated ioutil with io and osOleksandr Redko
https://pkg.go.dev/io/ioutil is deprecated since Go 1.16.
2022-12-22Add HUGO_PUBLISHDIR to the Node environmentBjørn Erik Pedersen
So you can do `process.env.HUGO_PUBLISHDIR` in your `postcss.config.js` to figure out where Hugo publishes its files. Note that the value will always be an absolute file path and will point to a directory on disk even when running `hugo server` in memory mode. If you write to this folder from PostCSS when running the server, you could run the server with one of these flags: ``` hugo server --renderToDisk hugo server --renderStaticToDisk ``` Fixes #10554
2022-12-21Allow "fast render mode" even if --disableLiveReload is setBjørn Erik Pedersen
Fixes #10561
2022-09-29Fix htimes /: operation not permitted error on config changesBjørn Erik Pedersen
Regression introduced in v0.104.1.
2022-05-27commands: Fix case where languages cannot be configuredBjørn Erik Pedersen
There are some commands that needs to complete without a complete configuration.
2022-05-15server: Fix SIGINT handling after loading bad configurationBjørn Erik Pedersen
Also fix the config error messages. Fixes #9664
2022-05-08Use configured timeZone for the clockBjørn Erik Pedersen
And some other related adjustments. Updates #8787
2022-05-08Add `clock` cli flagsatotake
Close #8787
2022-05-06Improve error messages, esp. when the server is runningBjørn Erik Pedersen
* Add file context to minifier errors when publishing * Misc fixes (see issues) * Allow custom server error template in layouts/server/error.html To get to this, this commit also cleans up and simplifies the code surrounding errors and files. This also removes the usage of `github.com/pkg/errors`, mostly because of https://github.com/pkg/errors/issues/223 -- but also because most of this is now built-in to Go. Fixes #9852 Fixes #9857 Fixes #9863
2022-04-18Revert "Revert "Fix PostProcess regression for hugo server""Bjørn Erik Pedersen
This reverts commit 6c35a1a9eacf2aa86a11ecd31c4022ce330b2f16. Updates #9794
2022-04-17Revert "Fix PostProcess regression for hugo server"Bjørn Erik Pedersen
This reverts commit 4deb5c60661bdb1d686664f0207f45517a086f29.
2022-04-16Fix PostProcess regression for hugo serverBjørn Erik Pedersen
Fixes #9788
2022-04-08Rework the Destination filesystem to make --renderStaticToDisk workBjørn Erik Pedersen
See #9626
2022-04-08Revert "Revert "Some minor adjustments to the new static filesystem logic""Bjørn Erik Pedersen
This reverts commit 5ef8a9f32c25a9b4cc821393c58733e57a7ad234.
2022-04-08Revert "Revert "Allow rendering static files to disk and dynamic to memory ↵Bjørn Erik Pedersen
in server mode"" This reverts commit 64b7b7a89753a39661219b2fcb92d7f185a03f63.
2022-03-21commands: Improve server startup to make tests less flakyBjørn Erik Pedersen
Do this by announcing/listen on the local address before we start the server.
2022-03-17all: gofmt -w -r 'interface{} -> any' .Bjørn Erik Pedersen
Updates #9687
2022-03-11Revert "Allow rendering static files to disk and dynamic to memory in server ↵Bjørn Erik Pedersen
mode" This reverts commit 7d8011ed63d587b87a7c182748914fe146590093. Updates #9647
2022-03-11Revert "Some minor adjustments to the new static filesystem logic"Bjørn Erik Pedersen
This reverts commit 63bb2a5b18193602fd442ebafdc85bc36fe05ad2.
2022-03-08Some minor adjustments to the new static filesystem logicBjørn Erik Pedersen
Closes #9625
2022-03-08Allow rendering static files to disk and dynamic to memory in server modeSatowTakeshi
Updates #9625
2022-02-21commands: Fix server panic regressionBjørn Erik Pedersen
And now with a proper server test. Fixes #9518 Fixes #9530 Fixes #9539
2022-02-10commands: Fix server deadlock on config errorBjørn Erik Pedersen
Fixes #9486
2021-09-17commands: Make the error handling for the mod commands more lenientBjørn Erik Pedersen
So it at least is possible to do a `hugo mod clean --all` if the cache is in a funky state.
2021-08-31commands: Don't fail on template errors on go mod graph etc.Bjørn Erik Pedersen
Fixes #8942
2021-08-31Avoid failing with "module not found" for hugo mod init and similarBjørn Erik Pedersen
Fixes #8940
2021-07-20commands: Fix panic on invalid config in "hugo mod get" and similarBjørn Erik Pedersen
Fixes #8773
2021-06-16Do not read config from os.Environ when running testsBjørn Erik Pedersen
Fixes #8655
2021-06-14Misc config loading fixesBjørn Erik Pedersen
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster: ``` BenchmarkDefaultConfigProvider/Viper-16 252418 4546 ns/op 2720 B/op 30 allocs/op BenchmarkDefaultConfigProvider/Custom-16 450756 2651 ns/op 1008 B/op 6 allocs/op ``` Fixes #8633 Fixes #8618 Fixes #8630 Updates #8591 Closes #6680 Closes #5192
2020-12-03all: Format code with gofumptBjørn Erik Pedersen
See https://github.com/mvdan/gofumpt
2020-10-22Allow getJSON errors to be ignoredBjørn Erik Pedersen
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866
2020-05-28Add redirect support to the serverBjørn Erik Pedersen
Fixes #7323
2020-05-18commands: Use WARN log level also for the early initializationBjørn Erik Pedersen
Fixes #7285
2020-03-08Add HTTP header support for the dev serverBjørn Erik Pedersen
Fixes #7031
2020-02-13commands: Rename doWithCommandeer to cfgInit/cfgSetAndInitMark Rosemaker
This will make it clearer what it does and make the code more consistent.