Commit graph

11 commits

Author SHA1 Message Date
Lars Lehtonen 26a8ec207f
Fix handling of dropped error in test 2023-11-29 09:37:26 +01:00
Bjørn Erik Pedersen 79a17d9e55 Fix tests for Go 1.21.1
Fixes #11450
2023-09-14 13:09:45 +02:00
Bjørn Erik Pedersen 24b1be45c1 Go 1.21 Upgrade
Fixes #11351
2023-08-23 21:49:27 +02:00
Bjørn Erik Pedersen b3f10556f0
Use os.UserCacheDir as first fallback if cacheDir is not set
We will now try

1. cacheDir (or, commonly set in environment as `HUGO_CACHEDIR`)
2. if on Netlify we use `/opt/build/cache/hugo_cache/`
3. os.UserCacheDir
4. A temp dir

Storing the cache, especially the module cache, in a temporary idea has had lots of hard to debug issues, especially on MacOS,
which this commit tries to fix.

This should also make it easier to locate the Hugo cache:

>UserCacheDir returns the default root directory to use for user-specific cached data. Users should create their own
application-specific subdirectory within this one and use that.
>
>On Unix systems, it returns $XDG_CACHE_HOME as specified by
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it
returns $HOME/Library/Caches. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache.
>
>If the location cannot be determined (for example, $HOME is not defined), then it will return an error.

Fixes #11286
Fixes #11291
2023-07-27 20:59:47 +02:00
Bjørn Erik Pedersen 0f921ace6f Fix hugo mod vendor for modules with hugo.toml
Fixes #11221
2023-07-08 16:08:46 +02:00
Oleksandr Redko 4c46f9400b all: Replace deprecated ioutil with io and os 2023-06-01 17:52:21 +02:00
Bjørn Erik Pedersen fd099331ec Fix Processed images count regression for multiple languages
Fixes #11002
2023-05-28 12:55:44 +02:00
Bjørn Erik Pedersen e96cdfe966 Don't create the public folder unless needed
Fixes #11031
2023-05-28 12:55:44 +02:00
Bjørn Erik Pedersen 241b21b0fd Create a struct with all of Hugo's config options
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-05-16 18:01:29 +02:00
Bjørn Erik Pedersen b886fa46bb
Revert "Add benchmark for building docs site"
We already have a lot of site building benchmarks. The main problem with adding the "Hugo site docs" to the list is that it cannot easiliy  be compared to any previous release, because its content/template/whatever has changed.

This reverts commit 837e084bbe.
2020-10-17 00:37:42 +02:00
Cameron Moore 837e084bbe Add benchmark for building docs site 2020-10-16 21:13:39 +02:00