-
Notifications
You must be signed in to change notification settings - Fork 107
Partial layouts not properly reloaded #25
Comments
In which OS you are trying? Normally, partials changes should cause to reload the page. |
I'm on OS X 10.7. |
Hmm. weird. I'm also using the same and it seems to work perfectly. Can you paste the log of a session where you change a partial and then reload a page? |
Here it is: ~ punch setup punch_test
Created a new site in punch_test
To get started, run: cd punch_test; punch s
~ cd punch_test; punch s
Started Punch server on port 9009
127.0.0.1 - GET / HTTP/1.1 200 - - 12 ms
127.0.0.1 - GET /css/main.css HTTP/1.1 200 - - 11 ms
127.0.0.1 - GET /css/normalize.css HTTP/1.1 200 - - 14 ms
127.0.0.1 - GET /css/site.css HTTP/1.1 200 - - 13 ms
127.0.0.1 - GET /favicon.ico HTTP/1.1 200 - - 4 ms
127.0.0.1 - GET / HTTP/1.1 200 - - 7 ms
127.0.0.1 - GET /css/normalize.css HTTP/1.1 304 - - 3 ms
127.0.0.1 - GET /css/main.css HTTP/1.1 304 - - 2 ms
127.0.0.1 - GET /css/site.css HTTP/1.1 304 - - 3 ms
127.0.0.1 - GET /favicon.ico HTTP/1.1 200 - - 1 ms
127.0.0.1 - GET / HTTP/1.1 200 - - 6 ms
127.0.0.1 - GET /css/normalize.css HTTP/1.1 304 - - 2 ms
127.0.0.1 - GET /css/main.css HTTP/1.1 304 - - 2 ms
127.0.0.1 - GET /css/site.css HTTP/1.1 304 - - 3 ms
127.0.0.1 - GET /favicon.ico HTTP/1.1 200 - - 2 ms The first I then removed I then added some text content in |
Can you try adding some other content in to I'm still unable to recreate the issue at this end. |
That's weird - I got the same problem here. I'll try to debug and I'll report back. |
@jbourassa Please let me know if you were able to regenerate the issue. |
@laktek If by "regenerate" you mean reproduce, yes I can. For what it's worth, I work with @renaudleo so our environments are very similar. |
@laktek Also, we're using CLI tools instead of XCode. Shrug. |
Is it expected that on a request, the server will regenerate the partials if they have changed with the following options?
Or do we need to have something like the following options if we want that behavior?
In both case, I have to kill the server then restart it and then only save the mustache file in order to see my change. If I want to make another change, I have to kill and restart to server again, and then save the file in order that a request to the server will regenerate the index.html file. |
@jbourassa It should work fine in CLI (actually, that's how it was intended to use). @prathe Cache directive should have no effect, because the max-age is set to 0 by default. So even when the caching is enabled, it should reflect the changes on a reload. The partials are detected as changed by their last modified time attribute. Can you check whether the OS/editor, sets the modified time correctly when you save the file? |
@laktek Ok, I figured it out. The cache in Mustache I see two ways of fixing this, use whichever you like best :
Yay :) |
which is related to janl/mustache.js#257. Thanks to @jbourassa for digging this.
Restrict mustache version. Fix #25 which is related to janl/mustache.js#257. Thanks to @jbourassa for digging this.
Thanks guys for digging into this issue and finding the solution. I've released a new version, which contains @prathe's update for the Mustache version. |
I followed the first run instructions, wich went quite well. But when I got to the last step, where I was prompted to remove the
{{{first-run}}}
tag in the footer partial, the partial was not reloaded after the changes I made.After a bit of messing around, I realized none of the partials were reloaded when I made changes, until I changed something in the main layout file. But again, this doesn't seem to be true all the time. Sometimes, even if I change something in the footer and layout, only changes made in the main layout will be shown when running the site.
I'm currently running the site on localhost:9009 using
punch s
, with node 0.8.8.What am I doing wrong?
The text was updated successfully, but these errors were encountered: