-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Generator plugins broken by new cleanup behavior #268
Comments
I am experiencing this issue too. Any file that is created by a generator will be marked as obsolete and deleted even though it has just been created. |
Same here. Good to know I'm not alone with this problem … |
Creating a Ruby file in the "_plugins" folder with the following contents works for me, though I haven't run it against the test suite:
|
@molte -- nice workaround, although I hope this isn't the long-term solution. In my case, I'm compiling LESS.js files, and with this workaround, they're all regenerated each run. |
Of course you could also entirely remove the
|
You can actually fix this by doing I've also updated the sample code in the wiki. |
I think that updated example in the wiki isn't right - "index" isn't anything at that point in the code. |
Sorry about that, it should be "f". I just took index from a plugin I wrote for my installation. If it's still broken, I can provide a complete working example, it just wont be the specific one the wiki uses. |
The working example may be good - even with that it looks like it's busted on the latest version of jekyll - it tries to call #destination on whatever is passed into static_files |
I've updated the example, although it might not be the simplest. It generates category index files, which people might find useful. |
I ended up using a custom implementation of StaticFile that didn't actually do anything during the write phase, but since it existed in site.static_files, the output wouldn't get cleaned away. See https://gist.github.com/920651 |
Why doesn't this affect the pagination plugin? |
I have absolutely no idea why my file is created during generation, and then deleted during cleanup.
I can't find any documentation relating to this at all. |
Our pagination generator is an example of getting around this. In your |
Any generator that writes files directly to the output directory is broken as of commit c1ed790 -- this includes the sample generator code in the wiki. It's not clear how a generator should specify that the files it creates are 'whitelisted'.
The text was updated successfully, but these errors were encountered: