Where to put a csv-file

As a csv-file is not allowed in data I wonder where to put it.

When I put it into static it gets copied to the server which is not what I want.

I now made the top-level directory “csv” an put the file there. It seems to work. The file is not copied to the webserver. If you have a better solution, please comment.

Content placed in static is indeed copied to the final result as it is the intended place for everything you need for your page like CSS, JS,images etc. You can put other content in here, but you’ll have to set the ignoreFiles option in order to let hugo ignore the CSV files. Your solution also works as it is not within any of the folders which hugo processes. I did the same thing as I’m building my CSS using LESS and created a folder static-src with a child folder called less where all my less files are stored. At build I first preprocess the LESS files, compiling them into CSS and store the compiled CSS into static where hugo can pick them up for building the site before I then postprocess the final build in order to minify it.

I just use a csv folder outside, next to my data one ;-(

1 Like