mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
Clarify that local CSV files cannot be inside data dir
Thanks @divinerites <divinerites@gmail.com> Ref: https://discourse.gohugo.io/t/error-message-failed-to-read-data-from-csv-even-it-is-working-fine/10763/7
This commit is contained in:
@@ -213,12 +213,16 @@ If you don't like caching at all, you can fully disable caching with the command
|
||||
|
||||
Currently, you can only use those authentication methods that can be put into an URL. [OAuth][] and other authentication methods are not implemented.
|
||||
|
||||
### Load Local files
|
||||
## Load Local files
|
||||
|
||||
To load local files with `getJSON` and `getCSV`, the source files must reside within Hugo's working directory. The file extension does not matter, but the content does.
|
||||
|
||||
It applies the same output logic as above in [Calling the Functions with a URL](#calling-the-functions-with-a-url).
|
||||
|
||||
{{% note %}}
|
||||
The local CSV files to be loaded using `getCSV` must be located **outside** of the `data` directory.
|
||||
{{% /note %}}
|
||||
|
||||
## LiveReload with Data Files
|
||||
|
||||
There is no chance to trigger a [LiveReload][] when the content of a URL changes. However, when a *local* file changes (i.e., `data/*` and `themes/<THEME>/data/*`), a LiveReload will be triggered. Symlinks are not supported. Note too that because downloading of data takes a while, Hugo stops processing your Markdown files until the data download has completed.
|
||||
|
||||
Reference in New Issue
Block a user