octopress / ink

A core component for building Gem based Jekyll themes.
MIT License
103 stars 36 forks source link

Better support for jekyll --watch #26

Closed imathis closed 9 years ago

maiertech commented 9 years ago

I'm using a rake task to build a Jekyll site based on ink. The rake task uses watch and serving options. since rc.40 Jekyll does not find layouts provided by an ink plugin when an automatic rebuild is triggered:

Build Warning: Layout 'theme:components/hero-unit' requested in _hero_unit/intro.md does not exist.

The initial build works without any issue. Used to work fine before rc.40.

imathis commented 9 years ago

Interesting. Could you post a minimal rake task and any steps which I can use to reproduce this issue?

maiertech commented 9 years ago

Clone https://github.com/UNStats/UNStats-theme/. Execute bundle, then bundle exec rake test:preview. First time it should work fine. Then change something in test/source/index.html to trigger rebuild. Then you should see errors.

imathis commented 9 years ago

Thanks. I'm following up on this now. I added a site reset hook to Octopress Hooks so I can clear out instance variables and rebuild plugins each time Jekyll triggers a build. I really appreciate your help.

imathis commented 9 years ago

I think we're good. I integrated with the new Octopress Hooks and now the plugins should all be reset for each build. I was able to get your repo to build changes without error with the new version, but let me know if this issue persists.

maiertech commented 9 years ago

Looks good! Thanks for fixing.