Following the reference example in the docs I’ve built a Hugo site using content from a Wordpress site via the REST API.
This works as intended on the first run. Both hugo server and hugo download the remote data and build/serve as expected.
On later rebuilds, no posts added to the WP site since the initial build are added. This seems to be a caching issue. The command hugo server --ignoreCache will fetch the updated posts.
As I recall this is done to avoid hammering an API on rebuilds, which is a sane choice. However, I’m not sure how to trigger a rebuild to fetch updates without using the --ignoreCache flag.
Is using the flag the expected behavior, or is there something I’m missing?
[caches.getresource]
dir = ':cacheDir/:project'
maxAge = '10m'
You can change the cache location if you want to inspect and easily clear it. For example, to place the files in the resources directory in the root of your project:
[caches.getresource]
dir = ':resourceDir'
maxAge = '10m'