-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Same Files compiling multiple times in nanoc-4.2.1 #886
Comments
Can you share the |
Can you show me where you are printing The rules are often evaluated twice (or more) to identify the processing instructions that are used, although the actual compilation is only done once. I expect this to be the reason. |
its printing here compile /*/ do I have added that pdf intentionally to verify.... otherwise it give a big /tmp/routes.txt file which have multiple same entry. |
Is this line always printed exactly five times? Can you share the output of |
It's not happening exactly five times always.But same file compiling same number of times after each compilation. /content/index.html ==> 5 times /content/asiakaspalvelu/aihe/kirja/ohje/kopiosuojausvaltuutus/index.html ==> 12 times Looks like it's happening for json, index.html and other file type as if in all compilation block executing multiple times for same file. |
It might be the case that Nanoc evaluates the Have you tried putting that |
Here's what I did:
So while the rule blocks are evaluated more than once (one may ask why, for example if rules are expensive), the actual erb filtering is just done once per item. You'll see two erb filter runs in the output, though:
While the debug output of Nanoc's erb filter indicates that the |
ok now it's clear why it's filtering multiple times. Thanks for your valuable reply. One more thing I am facing issue on processing static component. Seems like rules are not working on static folder as if it's not processing at all anything inside static. Previously its was working on nanoc 3.7.5 version. And I have some layouts as well in static folder which is getting this error message. Nanoc::Int::Errors::UnknownLayout: The site does not have a layout with identifier “/static/components/site-common/analytics/google-tag-manager.erb” I am adding layout this way but still not working getting same error. new_layout(File.open('./static/components/site-common/analytics/google-tag-manager.erb', 'r').read, {}, '/static/components/site-common/analytics/google-tag-manager.erb') And new_item also not working as i was trying to add content inside static directory to process. |
pmalik56 wrote:
Do you mean the static data source? That was removed in nanoc 4. On the upgrade page, it says:
See -thh |
Is there any way to create a new layout of erb which is not in layout directory but in content directory. Like I have one component 'site-common' in static folder which I wise to put inside content directory and it has some erb files to be used as layout. But I am not able to create new layout using #new_layout this function. |
Please use the Nanoc Google Group for support. GitHub issues is only for issues. I’ll close this for now! |
FYI, this will happen far less in 4.2.4, thanks to #902. |
Same file iterate inside compile and route block for 5-6 times not sure what is the reason or how nanoc identify whether a file compiled or not? In previous version 3.7.5 it was compiling once for a file.
compile '/*/' do
Same file enter in this blok multiple times
end
The text was updated successfully, but these errors were encountered: