Hi,
is there a way to customize the $HUGO/resources directory?
Id like to set it to e.g. /tmp/resources
.
I tried to disable it too but to no effect:
build:
useResourceCacheWhen: never
Hi,
is there a way to customize the $HUGO/resources directory?
Id like to set it to e.g. /tmp/resources
.
I tried to disable it too but to no effect:
build:
useResourceCacheWhen: never
As per the documentation you should be able to configure the cacheDir
and much more as needed.
Also useResourceCacheWhen should work:
When to use the cached resources in
/resources/_gen
for PostCSS and ToCSS. Valid values arenever
,always
andfallback
. The last value means that the cache will be tried if PostCSS/extended version is not available.
Please share a sample repository that reproduces the issue, we need to see the full context of the project’s configuration and structure.
Also if you are using Hugo Extended Features such as SASS or PostCSS, please make sure to generate and commit the shared repo so that I can test with the basic version of Hugo.
@alexandros seems to work when I set the caches, thank you!
caches:
assets:
dir: /tmp/hugo_cache/_gen
maxAge: -1
getcsv:
dir: /tmp/hugo_cache/_gen
maxAge: -1
getjson:
dir: /tmp/hugo_cache/_gen
maxAge: -1
images:
dir: /tmp/hugo_cache/_gen
maxAge: -1
modules:
dir: /tmp/hugo_cache/_gen
maxAge: -1
The resource cache is always created, but the files in it are not used when you change useResourceCacheWhen
. I have the feeling that you try to attempt something completely different like getting the directory out of your repo/system. Whenever you use pipes with Hugo it will create that directory. There is no way to set it up without it. You can add it to .gitignore
though and it’s not committed to your repo and wherever you run Hugo next.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.