hugo
hugo copied to clipboard
Add a way to avoid copying from /static
I'm interested in having a 1GB+ staticDir under a consistent prefix, say /files.
It seems like however staticDir is set, it copies it into public/ and such. I'd rather hugo not manage that and copy it myself, while still being able to refer to the folder while running hugo server.
Would this be a useful new feature or is there already a way to do it?
Thank you!
Would this be a useful new feature or is there already a way to do it?
- The /static folder is currently copy-as-is
- If you don't want that, then don't put anything in it
- If you, as an example, create a symlink in /public/mybigfiles that will work exactly like a /static setup; Hugo does not need to know about that.
Hi bep, thanks for replying.
If I make a symlink under content, I can see "mybigfiles" in hugo server. However, it gets copied when I hugo.
Is there a way that I can ignore that directory when running hugo or include content outside of content/ when running hugo server?
I guess I could symlink before hugo server and delete after hugo, potentially.
So, the different folders in Hugo have different roles. If you put them below /my-site/foo then Hugo will not touch them.
But if it's below that directory hugo server won't serve them, right?
I have worked around this for myself by just avoiding hugo server and doing a local webserver.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.