Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Fix LiveReload for asset subdirectories. Fixes #56. #57

Conversation

dcalhoun
Copy link
Contributor

Jekyll's _config.yml exclude option does not allow for paths to subdirectories. In order to support LiveReload of asset subdirectories, this commit passes the _config.yml file the deepest directory for each asset type (e.g. – JavaScript, CSS, images, fonts). Fixes #56.

@robwierzbowski
Copy link
Owner

I'm reluctant to exclude all folders with the deepest directory — I suppose this is default Jekyll behavior, but it feels broken to me.

Did you try the globbing way: my/asset/dir/**/*? jekyll/jekyll#906 (comment) leads me to believe that might work.

(Thanks for the reference links, btw!)

@dcalhoun
Copy link
Contributor Author

Yes, I did try nested globs. It did not work. The only alternative that I can think of is excluding the top-level directory for each asset type (e.g. - /assets/) rather than the deepest.

I believe this ultimately should really be fixed on Jekyll's side, but until that happens I think this is a good solution. For people who stick with your default top level asset directories, absolutely nothing would change. We are just expanding the capability of the generator.

@robwierzbowski
Copy link
Owner

Works just like you describe. Refined the exclude dir generation a little and merged.

Adding a little note to the readme as well. Pinged the Jekyll issue, hopefully we'll get a fix soon.

Thanks for the great issue report and PR.

@dcalhoun dcalhoun deleted the bug/56-livereload-asset-subdirectories branch December 28, 2013 23:21
@robwierzbowski
Copy link
Owner

README note: 5e34f0b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Placing assets in subdirectories breaks LiveReload
2 participants