New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial Static Sync #1644
Comments
… the flag forceCopyStatic to always copy all static files when a file is changed
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
Hello @ffrizzo, Thank you for your contribution, @ffrizzo! But I think I encountered a bug in your current implementation in #1671: the static directory in the theme is not synchronized. It detects that I changed the style.css (which is inside the theme's static/ directory), but it is probably trying to copy it from the wrong place. |
Hello @anthonyfok , I'll take a look on that and I'll submit a new pull request with the fix. |
Fix watcher copy static theme files for changed files See gohugoio#1644 gohugoio#1559
On my box, it actually copies a bit more than just the changed file. Every single file is written to the output directory for every single run of hugo, with the exception of those in the static files directory. |
@Skrylar can you provide more information about that? Can you paste the output running with |
If I force the cache directory to be somewhere (ex. in the "cache" folder of the same directory), no files are left behind there. I'm not sure if that's intended or a symptom. |
I just wanted to contribute an issue with the static folder not showing the contributed files from the theme on a Windows machine. My post on the forum here. |
This issue has been automatically marked as stale because it has not been commented on for at least six months. 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 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. |
@jdevoo this issue isn't really about your problem. |
But then again, I'm pretty sure that this "syncing issue" described in the first post also should be fixed now, by what I can read in the code and by testing; we only sync the path matching the change event(s). Can you confirm, @spf13 ? |
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
Fix watcher copy static theme files for changed files See gohugoio#1644 gohugoio#1559
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. |
Today Hugo synchronizes the entire static directory each time a file change is detected. While it only copies the changed file(s), it still goes through the process of evaluating all files on both sides to determine which file needs to be synced. This isn't necessary as we already know what file changed. We should just sync that file.
The text was updated successfully, but these errors were encountered: