recurser/jekyll-plugins — pull request #10 by kemayo (2011-10-16 09:03:51+00:00)
Title: Check that a static page exists before acting on it

Pages created by generators otherwise cause an error. e.g. pagination.

Example of said error:

[03:57][david@plug:~/src/jekyll_test(master)]$ jekyll
Configuration from /home/david/src/jekyll_test/_config.yml
Building site: /home/david/src/jekyll_test -> /home/david/src/jekyll_test/_site
/home/david/src/jekyll_test/_plugins/generate_sitemap.rb:85:in `mtime': No such file or directory - /home/david/src/jekyll_test/blog/page/2/index.html (Errno::ENOENT)
from /home/david/src/jekyll_test/_plugins/generate_sitemap.rb:85:in `block in generate_content'
from /home/david/src/jekyll_test/_plugins/generate_sitemap.rb:83:in `each'
from /home/david/src/jekyll_test/_plugins/generate_sitemap.rb:83:in `generate_content'
from /home/david/src/jekyll_test/_plugins/generate_sitemap.rb:60:in `block in generate'
from /home/david/src/jekyll_test/_plugins/generate_sitemap.rb:58:in `open'
from /home/david/src/jekyll_test/_plugins/generate_sitemap.rb:58:in `generate'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.rb:184:in `block in generate'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.rb:183:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.rb:183:in `generate'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.rb:39:in `process'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/bin/jekyll:250:in `'
from /usr/bin/jekyll:19:in `load'
from /usr/bin/jekyll:19:in `

'