Pages don't update when markdown content changes
eventhough opened this issue · 9 comments
I notice when I refresh the page I am not picking up any changes that happen in .md files. Is there a way to force wintersmith to pull the latest content for each page reload?
if you use wintersmith preview
content is generated on each request
@jnordberg Are there any other settings that need to be added because I am running wintersmith preview, updating index.md, and not seeing any changes. The only way I can get changes in content is if I ctrl-c and re-run wintersmith preview. Here is my project: https://github.com/eventhough/kevinandkaty.com
Just tested your project and it updates fine for me. Check that your wintersmith install is fresh
@jnordberg I'm running wintersmith 2.2.3 which is the latest. So weird. I run $ wintersmith preview
in my project directory...then I edit any .md
file and I go back to my browser to refresh localhost:8080...and nothing. The only way I get changes is if I restart wintersmith preview
. Is there any way I can output a debug log or something? Again this is not a huge deal for me since the site I'm building does not require very many changes...but I figured it should probably pick up changes without restart.
Odd, Post a debug log with wintersmith preview -v
also your platform and node version
OSX 10.10.5
Node: 0.12.7
starting preview server
verbose creating environment - work directory: /Users/kevinwu/Develop/html/kevinandkaty.com
using config file: /Users/kevinwu/Develop/html/kevinandkaty.com/config.json
verbose config: {"contents":"./contents","templates":"./templates","views":null,"locals":{"owner":"Kevin Wu & Katy Tsai","title":"Kevin and Katy"},"plugins":["wintersmith-libsass","wintersmith-livereload"],"jade":{"pretty":true},"ignore":[],"require":{},"output":"./build","baseUrl":"/","hostname":null,"port":8080,"_fileLimit":40,"_restartOnConfChange":true,"__filename":"/Users/kevinwu/Develop/html/kevinandkaty.com/config.json","_cliopts":{"verbose":true,"v":true,"quiet":false,"q":false,"version":false,"V":false,"help":false,"h":false,"c":"./config.json","C":null},"verbose":true,"v":true,"quiet":false,"q":false,"version":false,"V":false,"help":false,"h":false,"c":"./config.json","C":null}
verbose watching config file /Users/kevinwu/Develop/html/kevinandkaty.com/config.json for changes
verbose starting preview server
verbose loading default plugin: page
verbose loading default plugin: jade
verbose registering template plugin JadeTemplate that handles: **/*.jade
verbose loading default plugin: markdown
verbose registering content plugin MarkdownPage that handles: **/*.*(markdown|mkd|md)
verbose registering content plugin JsonPage that handles: **/*.json
verbose loading plugin: wintersmith-libsass
verbose registering content plugin NodeSassPlugin that handles: **/[^_]*.scss
verbose loading plugin: wintersmith-livereload
LiveReload socket running on port 35729
server running on: http://localhost:8080/
Load page first time:
verbose contentHandler - /index.html
200 / MarkdownPage 12ms
verbose contentHandler - /assets/styles/main.css
verbose contentHandler - /livereload.js
verbose contentHandler - /assets/scripts/photoswipe.min.js
verbose contentHandler - /assets/scripts/photoswipe-ui-default.min.js
verbose contentHandler - /assets/scripts/main.js
200 /assets/scripts/photoswipe-ui-default.min.js StaticFile 23ms
200 /assets/scripts/photoswipe.min.js StaticFile 24ms
200 /livereload.js StaticFile 25ms
200 /assets/scripts/main.js StaticFile 24ms
200 /assets/styles/main.css NodeSassPlugin 169ms
verbose contentHandler - /assets/images/background.jpg
200 /assets/images/background.jpg StaticFile 7ms
verbose contentHandler - /assets/images/favicon-16x16.png
200 /assets/images/favicon-16x16.png StaticFile 2ms
verbose contentHandler - /assets/images/favicon-32x32.png
200 /assets/images/favicon-32x32.png StaticFile 2ms
verbose contentHandler - /assets/images/favicon.ico
200 /assets/images/favicon.ico StaticFile 2ms
Make a single edit to index.md
and re-load browser:
verbose contentHandler - /index.html
200 / MarkdownPage 7ms
verbose contentHandler - /assets/styles/main.css
verbose contentHandler - /livereload.js
verbose contentHandler - /assets/scripts/photoswipe.min.js
verbose contentHandler - /assets/scripts/photoswipe-ui-default.min.js
verbose contentHandler - /assets/scripts/main.js
200 /livereload.js StaticFile 9ms
200 /assets/scripts/photoswipe.min.js StaticFile 9ms
200 /assets/scripts/photoswipe-ui-default.min.js StaticFile 9ms
200 /assets/scripts/main.js StaticFile 10ms
200 /assets/styles/main.css NodeSassPlugin 112ms
verbose contentHandler - /assets/images/background.jpg
200 /assets/images/background.jpg StaticFile 6ms
verbose contentHandler - /assets/images/favicon-16x16.png
200 /assets/images/favicon-16x16.png StaticFile 2ms
verbose contentHandler - /assets/images/favicon-32x32.png
200 /assets/images/favicon-32x32.png StaticFile 3ms
verbose contentHandler - /assets/images/favicon.ico
200 /assets/images/favicon.ico StaticFile 3ms
Change does not show up in browser.
Logs look fine. Guessing it's the fsevents not coming through for some reason..
Try updating to node v4 and see if that helps. If not run the https://github.com/paulmillr/chokidar test suite.
Also i disabled the wintersmith-libsass plugin you have since i don't have the deps installed, long shot but try without it.
Thanks it was worth a shot. I removed all the plugins and tried again...still no content updates. It's okay. Thanks for all your work on this site builder - it's super easy to use.
It just doesn't reload any *.md files included in templates.
like:
include:markdown ../contents/sample.md