Other files in html root

I’m running Hugo on the same Raspberry Pi as my server, and have symlinked my html root, so my website is served directly from my ‘Hugo’ ‘public’ directory, and it works fine :slightly_smiling:

I also have a few files which I need to keep in my website root (such as a html file which is checked to warn if my site is down) and wondered where the best place would be to save them.

I’ve currently placed them in my ‘public’ directory. But was thinking should they ideally be placed in one of the other dir’s such as static, and be copied across as part of the Hugo compile process when Hugo is run?

Thoughts please

Paul

Put it in /static

Thanks Bjørn, mostly works from /static, except one of the files is a symlink to a directory;
energy -> /home/pi/energy
so I can access the energy monitoring system at http://mydomain.com/energy

However, when Hugo compiles, instead of copying the symlink to my website root, it copies the actual whole energy directory!

Paul

I think it would be even more confusing if Hugo copied the symlink to /public … what would happen if you then do a rsync to your webserver or deployment to Amazon S3 … with no knowledge about your symlink etc. The symlink support in Hugo is limited, but do not put symlinks in /static if you don’t want Hugo to treat it as actual file content.

I’ll add the symlink direct to /public manually then. At least the other files are copied across OK from /static which is an improvement to the structure.

Paul