-
Notifications
You must be signed in to change notification settings - Fork 996
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
fixes #1599 #1672
fixes #1599 #1672
Conversation
no longer associate assets from subfolders, only the current folder
cc @timakro looking at that change it does make sense to me to ignore the subdirectories and it wouldn't break anything, correct? |
@mtolk @Keats On first glance it seems to me this effectively reverts #1582. Changing the asset scanning from flat ( |
It looks like it still works: #1597 (comment) But I see the issue. The issue is that section assets are poorly defined so using walkdir on a section would just mark every single page asset as their own. |
I think #1677 might work? |
Do I understand correctly that the difficulty with this feature is that it's a little tricky to figure out how a file should be treated because it differs based on (not sure which factors?) |
So a section and a page can have colocated assets. A page has to be in its own folder while assets for a sections are at its level (not consistent, it will need to be fixed, in an ulterior version).
When looking for the assets for the |
Gotcha, so this could potential break if you had a subfolder of blog called I think we need to check if the subfolders do not contain an |
This is more an issue with duplicated assets in the output dir and threads trying to copy the files at the same time which seems to be an issue on Windows. |
The problem i tried to solve was that, because 1 file could be an asset of multiple sections and a page, it was copied multiple times. It's actually the multiple copies that cause erros that was my problem. I think it makes sense that an asset is associated with only 1 page or section, but that's not a requirement i think. I used it as a solution to the multiple copying problem. If you would allow different pages and section to share an assets another solution would have to found to prevent it being copied multiple times, at the same time. #1677 is already a more elegant solution that this pull request. I had never realised people would place assets in subfolders. |
no longer associate assets from subfolders, only the current folder.
This caused two threads writing creating the same file. when this happens at the same time zola build on windows crashes.
I've ran the test-suite about 10 times no longer seen the error.
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?