summaryrefslogtreecommitdiffstats
path: root/commands
AgeCommit message (Collapse)Author
2022-05-09Revise the use of htime.Since/htime.NowBjørn Erik Pedersen
We cannot (also, it doesn't add any value) use that when the `clock` is set, * To measure time (before that global is set) * To compare file timestamps re cache eviction Fixes #9868
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-18Fix syncing of /static regressionBjørn Erik Pedersen
As introduced in Hugo `v0.76.1`. And add a proper test for it. Fixes #9794 Closes #9788
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-25commands: Change link protocol to httpsJoe Mooring
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-14Improve server startup/shutdownBjørn Erik Pedersen
Closes #9671
2022-03-14commands: Improve server testsBjørn Erik Pedersen
Updates #9647
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-23Add support for CODEOWNERSMarshall Cottrell
Fixes #9474
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-15Add --printUnusedTemplatesBjørn Erik Pedersen
Fixes #9502
2022-02-15commands: Rename --i18n-warnings to printI18nWarningsBjørn Erik Pedersen
To get it in line with the others.
2022-02-15commands: Rename --path-warnings, --print-men to --printPathWarnings, ↵Bjørn Erik Pedersen
--printMemoryUsage To get it in line with the others.
2022-02-10commands: Fix server deadlock on config errorBjørn Erik Pedersen
Fixes #9486
2022-02-10Remove the "check" commandJoe Mooring
Closes #9454
2022-02-01Remove hugo gen autocompleteJoe Mooring
Closes #8862
2022-01-07commands: Fix CLI help text for hugo newBjørn Erik Pedersen
Updates #9363
2022-01-06Add --panicOnWarning flagBjørn Erik Pedersen
Fixes #9357 Fixes #9359
2022-01-04Misc depreation updatesBjørn Erik Pedersen
* Deprecate .Page.Path when backed by a file * site.Permalinks * --ignoreVendor (use --ignoreVendorPaths) Closes #9348 Closes #9349
2021-11-13commands: Make sure pollInterval is always setBjørn Erik Pedersen
Fixes #9165
2021-11-12commands: Fix missing file locking in server partial renderBjørn Erik Pedersen
Fixes #9162
2021-10-18Fix the "page picker" logic in --navigateToChangedBjørn Erik Pedersen
Fixes #9051
2021-10-18Add a cross process build lock and use it in the archetype content builderBjørn Erik Pedersen
Fixes #9048
2021-10-16Reimplement archetypesBjørn Erik Pedersen
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template. This new implementation is using the exact same code path for evaluating the pages as in a regular build. This also makes it more robust and easier to reason about in a multilingual setup. Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language: ```bash hugo new content/en/posts/my-first-post.md ``` Fixes #9032 Fixes #7589 Fixes #9043 Fixes #9046 Fixes #9047
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-08-21Revert "commands: Avoid too many watch file handles causing the server to ↵Bjørn Erik Pedersen
fail to start" This reverts commit 3f38c785b7208440e2a9dd9a80cb39d4ae23e676.
2021-08-21highlight: Remove some pygments referencesHelder Pereira
2021-08-19commands: Avoid too many watch file handles causing the server to fail to startShiming Zhang
Fixes #8904
2021-08-14Import time/tzdata on WindowsBjørn Erik Pedersen
Updates #8892
2021-07-28Switch to go-toml v2Bjørn Erik Pedersen
We have been using `go-toml` for language files only. This commit makes it the only TOML library. It's spec compliant and very fast. A benchark building a site with 200 pages with TOML front matter: ```bash name old time/op new time/op delta SiteNew/Regular_TOML_front_matter-16 48.5ms ± 1% 47.1ms ± 1% -2.85% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Regular_TOML_front_matter-16 16.9MB ± 0% 16.7MB ± 0% -1.56% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Regular_TOML_front_matter-16 302k ± 0% 296k ± 0% -2.20% (p=0.029 n=4+4) ``` Note that the front matter unmarshaling is only a small part of building a site, so the above is very good. Fixes #8801
2021-07-20commands: Fix panic on invalid config in "hugo mod get" and similarBjørn Erik Pedersen
Fixes #8773
2021-07-15hugofs: Make FileMeta a structBjørn Erik Pedersen
This commit started out investigating a `concurrent map read write` issue, ending by replacing the map with a struct. This is easier to reason about, and it's more effective: ``` name old time/op new time/op delta SiteNew/Regular_Deep_content_tree-16 71.5ms ± 3% 69.4ms ± 5% ~ (p=0.200 n=4+4) name old alloc/op new alloc/op delta SiteNew/Regular_Deep_content_tree-16 29.7MB ± 0% 27.9MB ± 0% -5.82% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Regular_Deep_content_tree-16 313k ± 0% 303k ± 0% -3.35% (p=0.029 n=4+4) ``` See #8749
2021-07-05commands: Move time notification to after any build errorsJohn Hollowell
This allows error parsers (VSCode problemMatchers) to use the time notification as bounds for detecting errors. Closes #8403
2021-07-05commands: Make the --poll flag a durationBjørn Erik Pedersen
So you can do: ``` hugo server --poll 700ms ``` See #8720
2021-07-04Add polling as a fallback to native filesystem events in server watchBjørn Erik Pedersen
Fixes #8720 Fixes #6849 Fixes #7930
2021-06-27modules: Use value type for module.TimeBjørn Erik Pedersen
Which is in line with how we do it elsewhere.