Skip to content
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

Partials do not update when content is in a symlink #1690

adamfortuna opened this issue Nov 19, 2015 · 3 comments


Copy link

@adamfortuna adamfortuna commented Nov 19, 2015

If you render a partial, and that partial exists in a symlink, it will work and render correctly. However, if you edit the content of that partial and reload the page, it will not use the updated partial. I have a feeling it has to do with having some internal cache based on the files modified date, and its not picking up changes within a symlink.

I've tried adding the symlinked folder to reload paths (both relative, and the original folder) but looks like it's not reloading in those cases. Here's the steps to reproduce:

If you have a folder outside of your middleman project called "/users/me/code/my_folder" and symlink that into your Middleman "source/symlinked_in_folder" folder and try to use a partial within that folder you'll see this behavior.

= partial 'symlinked_in_folder/example'

Just ran into this, and am still tracking it down. If I do, I'll try adding a PR with it. :)

@adamfortuna adamfortuna changed the title Using partial doesn Partials do not update when content is in a symlink Nov 19, 2015

This comment has been minimized.

Copy link

@adamfortuna adamfortuna commented Nov 20, 2015

Narrowed this down to v3.4 not working as you'd expect ( issue here in the listen gem ) guard/listen#279 .

A workaround for the moment is to use the force_polling option, which does cause these to update:

middleman server --reload-paths data/,lib/ --force_polling true

Going to also try updating to 4's rc to see if that helps out as a next step.


This comment has been minimized.

Copy link

@jimothyGator jimothyGator commented Feb 4, 2016

I've found that Middleman 4's multiple source folders has eliminated my need for symlinks. There's not a lot of documentation for it at present, but you can find some examples in the test fixtures, such as multiple-sources-app and multiple-sources-with-duplicate-file-names-app. Check out config.rb in both directories.

Also possibly useful, though I haven't yet used this myself, are the import_path and import_file methods. Example


This comment has been minimized.

Copy link

@sandstrom sandstrom commented Nov 20, 2016

I'm doing some issue-gardening 🌿🌷🌾 and came across this issue.

Sorry that this has lingered for quite a while! This should work in v4. If not a a PR with a failing test would be a great start.

Also, @jimothyGator if you'd like to provide a PR to the docs ( that would be awesome! ⛵️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.