link-checker 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +81 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +56 -0
- data/LICENSE.txt +20 -0
- data/README.md +15 -0
- data/Rakefile +29 -0
- data/VERSION +1 -0
- data/bin/check-links +8 -0
- data/lib/link_checker.rb +80 -0
- data/link-checker.gemspec +404 -0
- data/spec/link-checker_spec.rb +92 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/test-site/.gitignore +12 -0
- data/spec/test-site/.powrc +5 -0
- data/spec/test-site/.rbenv-version +1 -0
- data/spec/test-site/.rvmrc +1 -0
- data/spec/test-site/.slugignore +3 -0
- data/spec/test-site/.themes/classic/sass/_base.scss +5 -0
- data/spec/test-site/.themes/classic/sass/_partials.scss +8 -0
- data/spec/test-site/.themes/classic/sass/base/_layout.scss +192 -0
- data/spec/test-site/.themes/classic/sass/base/_solarized.scss +46 -0
- data/spec/test-site/.themes/classic/sass/base/_theme.scss +86 -0
- data/spec/test-site/.themes/classic/sass/base/_typography.scss +161 -0
- data/spec/test-site/.themes/classic/sass/base/_utilities.scss +28 -0
- data/spec/test-site/.themes/classic/sass/custom/_colors.scss +43 -0
- data/spec/test-site/.themes/classic/sass/custom/_fonts.scss +10 -0
- data/spec/test-site/.themes/classic/sass/custom/_layout.scss +21 -0
- data/spec/test-site/.themes/classic/sass/custom/_styles.scss +2 -0
- data/spec/test-site/.themes/classic/sass/partials/_archive.scss +72 -0
- data/spec/test-site/.themes/classic/sass/partials/_blog.scss +141 -0
- data/spec/test-site/.themes/classic/sass/partials/_footer.scss +19 -0
- data/spec/test-site/.themes/classic/sass/partials/_header.scss +18 -0
- data/spec/test-site/.themes/classic/sass/partials/_navigation.scss +137 -0
- data/spec/test-site/.themes/classic/sass/partials/_sharing.scss +8 -0
- data/spec/test-site/.themes/classic/sass/partials/_sidebar.scss +5 -0
- data/spec/test-site/.themes/classic/sass/partials/_syntax.scss +253 -0
- data/spec/test-site/.themes/classic/sass/partials/sidebar/_base.scss +106 -0
- data/spec/test-site/.themes/classic/sass/partials/sidebar/_delicious.scss +4 -0
- data/spec/test-site/.themes/classic/sass/partials/sidebar/_googleplus.scss +26 -0
- data/spec/test-site/.themes/classic/sass/partials/sidebar/_pinboard.scss +12 -0
- data/spec/test-site/.themes/classic/sass/partials/sidebar/_twitter.scss +34 -0
- data/spec/test-site/.themes/classic/sass/screen.scss +10 -0
- data/spec/test-site/.themes/classic/source/_includes/after_footer.html +5 -0
- data/spec/test-site/.themes/classic/source/_includes/archive_post.html +8 -0
- data/spec/test-site/.themes/classic/source/_includes/article.html +28 -0
- data/spec/test-site/.themes/classic/source/_includes/asides/delicious.html +8 -0
- data/spec/test-site/.themes/classic/source/_includes/asides/github.html +30 -0
- data/spec/test-site/.themes/classic/source/_includes/asides/googleplus.html +11 -0
- data/spec/test-site/.themes/classic/source/_includes/asides/pinboard.html +19 -0
- data/spec/test-site/.themes/classic/source/_includes/asides/recent_posts.html +10 -0
- data/spec/test-site/.themes/classic/source/_includes/asides/twitter.html +19 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/after_footer.html +3 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/asides/about.html +4 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/category_feed.xml +27 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/footer.html +4 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/head.html +3 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/header.html +6 -0
- data/spec/test-site/.themes/classic/source/_includes/custom/navigation.html +4 -0
- data/spec/test-site/.themes/classic/source/_includes/disqus.html +21 -0
- data/spec/test-site/.themes/classic/source/_includes/facebook_like.html +10 -0
- data/spec/test-site/.themes/classic/source/_includes/footer.html +1 -0
- data/spec/test-site/.themes/classic/source/_includes/google_analytics.html +13 -0
- data/spec/test-site/.themes/classic/source/_includes/google_plus_one.html +9 -0
- data/spec/test-site/.themes/classic/source/_includes/head.html +29 -0
- data/spec/test-site/.themes/classic/source/_includes/header.html +1 -0
- data/spec/test-site/.themes/classic/source/_includes/navigation.html +15 -0
- data/spec/test-site/.themes/classic/source/_includes/post/author.html +8 -0
- data/spec/test-site/.themes/classic/source/_includes/post/categories.html +10 -0
- data/spec/test-site/.themes/classic/source/_includes/post/date.html +15 -0
- data/spec/test-site/.themes/classic/source/_includes/post/disqus_thread.html +1 -0
- data/spec/test-site/.themes/classic/source/_includes/post/sharing.html +11 -0
- data/spec/test-site/.themes/classic/source/_includes/twitter_sharing.html +11 -0
- data/spec/test-site/.themes/classic/source/_layouts/category_index.html +17 -0
- data/spec/test-site/.themes/classic/source/_layouts/default.html +14 -0
- data/spec/test-site/.themes/classic/source/_layouts/page.html +42 -0
- data/spec/test-site/.themes/classic/source/_layouts/post.html +43 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/background.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/background.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/playIcon.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/dock/button.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/glow.xml +115 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/item.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
- data/spec/test-site/.themes/classic/source/assets/jwplayer/player.swf +0 -0
- data/spec/test-site/.themes/classic/source/atom.xml +27 -0
- data/spec/test-site/.themes/classic/source/blog/archives/index.html +18 -0
- data/spec/test-site/.themes/classic/source/favicon.png +0 -0
- data/spec/test-site/.themes/classic/source/images/bird_32_gray.png +0 -0
- data/spec/test-site/.themes/classic/source/images/bird_32_gray_fail.png +0 -0
- data/spec/test-site/.themes/classic/source/images/code_bg.png +0 -0
- data/spec/test-site/.themes/classic/source/images/dotted-border.png +0 -0
- data/spec/test-site/.themes/classic/source/images/email.png +0 -0
- data/spec/test-site/.themes/classic/source/images/line-tile.png +0 -0
- data/spec/test-site/.themes/classic/source/images/noise.png +0 -0
- data/spec/test-site/.themes/classic/source/images/rss.png +0 -0
- data/spec/test-site/.themes/classic/source/images/search.png +0 -0
- data/spec/test-site/.themes/classic/source/index.html +29 -0
- data/spec/test-site/.themes/classic/source/javascripts/ender.js +45 -0
- data/spec/test-site/.themes/classic/source/javascripts/github.js +37 -0
- data/spec/test-site/.themes/classic/source/javascripts/libs/ender.js +1497 -0
- data/spec/test-site/.themes/classic/source/javascripts/libs/jXHR.js +85 -0
- data/spec/test-site/.themes/classic/source/javascripts/libs/swfobject-dynamic.js +298 -0
- data/spec/test-site/.themes/classic/source/javascripts/modernizr-2.0.js +5 -0
- data/spec/test-site/.themes/classic/source/javascripts/octopress.js +161 -0
- data/spec/test-site/.themes/classic/source/javascripts/pinboard.js +56 -0
- data/spec/test-site/.themes/classic/source/javascripts/twitter.js +78 -0
- data/spec/test-site/CHANGELOG.markdown +29 -0
- data/spec/test-site/Gemfile +18 -0
- data/spec/test-site/Gemfile.lock +69 -0
- data/spec/test-site/README.markdown +36 -0
- data/spec/test-site/Rakefile +379 -0
- data/spec/test-site/_config.yml +99 -0
- data/spec/test-site/config.rb +16 -0
- data/spec/test-site/config.ru +25 -0
- data/spec/test-site/plugins/backtick_code_block.rb +43 -0
- data/spec/test-site/plugins/blockquote.rb +83 -0
- data/spec/test-site/plugins/category_generator.rb +174 -0
- data/spec/test-site/plugins/code_block.rb +98 -0
- data/spec/test-site/plugins/date.rb +98 -0
- data/spec/test-site/plugins/gist_tag.rb +100 -0
- data/spec/test-site/plugins/haml.rb +24 -0
- data/spec/test-site/plugins/image_tag.rb +50 -0
- data/spec/test-site/plugins/include_array.rb +58 -0
- data/spec/test-site/plugins/include_code.rb +73 -0
- data/spec/test-site/plugins/jsfiddle.rb +40 -0
- data/spec/test-site/plugins/octopress_filters.rb +135 -0
- data/spec/test-site/plugins/pagination.rb +121 -0
- data/spec/test-site/plugins/post_filters.rb +176 -0
- data/spec/test-site/plugins/preview_unpublished.rb +48 -0
- data/spec/test-site/plugins/pullquote.rb +45 -0
- data/spec/test-site/plugins/pygments_code.rb +41 -0
- data/spec/test-site/plugins/raw.rb +40 -0
- data/spec/test-site/plugins/render_partial.rb +69 -0
- data/spec/test-site/plugins/rubypants.rb +489 -0
- data/spec/test-site/plugins/sitemap_generator.rb +312 -0
- data/spec/test-site/plugins/titlecase.rb +36 -0
- data/spec/test-site/plugins/video_tag.rb +47 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/background.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/divider.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/playButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/display/background.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/display/bufferIcon.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/display/muteIcon.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/display/playIcon.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/dock/button.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/glow.xml +115 -0
- data/spec/test-site/public/assets/jwplayer/glow/playlist/item.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/playlist/itemOver.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
- data/spec/test-site/public/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
- data/spec/test-site/public/assets/jwplayer/player.swf +0 -0
- data/spec/test-site/public/atom.xml +27 -0
- data/spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html +196 -0
- data/spec/test-site/public/blog/archives/index.html +149 -0
- data/spec/test-site/public/favicon.png +0 -0
- data/spec/test-site/public/images/bird_32_gray.png +0 -0
- data/spec/test-site/public/images/bird_32_gray_fail.png +0 -0
- data/spec/test-site/public/images/code_bg.png +0 -0
- data/spec/test-site/public/images/dotted-border.png +0 -0
- data/spec/test-site/public/images/email.png +0 -0
- data/spec/test-site/public/images/line-tile.png +0 -0
- data/spec/test-site/public/images/noise.png +0 -0
- data/spec/test-site/public/images/rss.png +0 -0
- data/spec/test-site/public/images/search.png +0 -0
- data/spec/test-site/public/index.html +165 -0
- data/spec/test-site/public/javascripts/ender.js +45 -0
- data/spec/test-site/public/javascripts/github.js +37 -0
- data/spec/test-site/public/javascripts/libs/ender.js +1497 -0
- data/spec/test-site/public/javascripts/libs/jXHR.js +85 -0
- data/spec/test-site/public/javascripts/libs/swfobject-dynamic.js +298 -0
- data/spec/test-site/public/javascripts/modernizr-2.0.js +5 -0
- data/spec/test-site/public/javascripts/octopress.js +161 -0
- data/spec/test-site/public/javascripts/pinboard.js +56 -0
- data/spec/test-site/public/javascripts/twitter.js +78 -0
- data/spec/test-site/public/sitemap.xml +15 -0
- data/spec/test-site/public/stylesheets/screen.css +1 -0
- data/spec/test-site/sass/_base.scss +5 -0
- data/spec/test-site/sass/_partials.scss +8 -0
- data/spec/test-site/sass/base/_layout.scss +192 -0
- data/spec/test-site/sass/base/_solarized.scss +46 -0
- data/spec/test-site/sass/base/_theme.scss +86 -0
- data/spec/test-site/sass/base/_typography.scss +161 -0
- data/spec/test-site/sass/base/_utilities.scss +28 -0
- data/spec/test-site/sass/custom/_colors.scss +43 -0
- data/spec/test-site/sass/custom/_fonts.scss +10 -0
- data/spec/test-site/sass/custom/_layout.scss +21 -0
- data/spec/test-site/sass/custom/_styles.scss +2 -0
- data/spec/test-site/sass/partials/_archive.scss +72 -0
- data/spec/test-site/sass/partials/_blog.scss +141 -0
- data/spec/test-site/sass/partials/_footer.scss +19 -0
- data/spec/test-site/sass/partials/_header.scss +18 -0
- data/spec/test-site/sass/partials/_navigation.scss +137 -0
- data/spec/test-site/sass/partials/_sharing.scss +8 -0
- data/spec/test-site/sass/partials/_sidebar.scss +5 -0
- data/spec/test-site/sass/partials/_syntax.scss +253 -0
- data/spec/test-site/sass/partials/sidebar/_base.scss +106 -0
- data/spec/test-site/sass/partials/sidebar/_delicious.scss +4 -0
- data/spec/test-site/sass/partials/sidebar/_googleplus.scss +26 -0
- data/spec/test-site/sass/partials/sidebar/_pinboard.scss +12 -0
- data/spec/test-site/sass/partials/sidebar/_twitter.scss +34 -0
- data/spec/test-site/sass/screen.scss +10 -0
- data/spec/test-site/source/_includes/after_footer.html +5 -0
- data/spec/test-site/source/_includes/archive_post.html +8 -0
- data/spec/test-site/source/_includes/article.html +28 -0
- data/spec/test-site/source/_includes/asides/delicious.html +8 -0
- data/spec/test-site/source/_includes/asides/github.html +30 -0
- data/spec/test-site/source/_includes/asides/googleplus.html +11 -0
- data/spec/test-site/source/_includes/asides/pinboard.html +19 -0
- data/spec/test-site/source/_includes/asides/recent_posts.html +10 -0
- data/spec/test-site/source/_includes/asides/twitter.html +19 -0
- data/spec/test-site/source/_includes/custom/after_footer.html +3 -0
- data/spec/test-site/source/_includes/custom/asides/about.html +4 -0
- data/spec/test-site/source/_includes/custom/category_feed.xml +27 -0
- data/spec/test-site/source/_includes/custom/footer.html +4 -0
- data/spec/test-site/source/_includes/custom/head.html +3 -0
- data/spec/test-site/source/_includes/custom/header.html +6 -0
- data/spec/test-site/source/_includes/custom/navigation.html +4 -0
- data/spec/test-site/source/_includes/disqus.html +21 -0
- data/spec/test-site/source/_includes/facebook_like.html +10 -0
- data/spec/test-site/source/_includes/footer.html +1 -0
- data/spec/test-site/source/_includes/google_analytics.html +13 -0
- data/spec/test-site/source/_includes/google_plus_one.html +9 -0
- data/spec/test-site/source/_includes/head.html +29 -0
- data/spec/test-site/source/_includes/header.html +1 -0
- data/spec/test-site/source/_includes/navigation.html +15 -0
- data/spec/test-site/source/_includes/post/author.html +8 -0
- data/spec/test-site/source/_includes/post/categories.html +10 -0
- data/spec/test-site/source/_includes/post/date.html +15 -0
- data/spec/test-site/source/_includes/post/disqus_thread.html +1 -0
- data/spec/test-site/source/_includes/post/sharing.html +11 -0
- data/spec/test-site/source/_includes/twitter_sharing.html +11 -0
- data/spec/test-site/source/_layouts/category_index.html +17 -0
- data/spec/test-site/source/_layouts/default.html +14 -0
- data/spec/test-site/source/_layouts/page.html +42 -0
- data/spec/test-site/source/_layouts/post.html +43 -0
- data/spec/test-site/source/_posts/2012-10-02-a-list-of-links.markdown +11 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/background.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/divider.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/playButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/display/background.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/display/bufferIcon.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/display/muteIcon.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/display/playIcon.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/dock/button.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/glow.xml +115 -0
- data/spec/test-site/source/assets/jwplayer/glow/playlist/item.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/playlist/itemOver.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
- data/spec/test-site/source/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
- data/spec/test-site/source/assets/jwplayer/player.swf +0 -0
- data/spec/test-site/source/atom.xml +27 -0
- data/spec/test-site/source/blog/archives/index.html +18 -0
- data/spec/test-site/source/favicon.png +0 -0
- data/spec/test-site/source/images/bird_32_gray.png +0 -0
- data/spec/test-site/source/images/bird_32_gray_fail.png +0 -0
- data/spec/test-site/source/images/code_bg.png +0 -0
- data/spec/test-site/source/images/dotted-border.png +0 -0
- data/spec/test-site/source/images/email.png +0 -0
- data/spec/test-site/source/images/line-tile.png +0 -0
- data/spec/test-site/source/images/noise.png +0 -0
- data/spec/test-site/source/images/rss.png +0 -0
- data/spec/test-site/source/images/search.png +0 -0
- data/spec/test-site/source/index.html +29 -0
- data/spec/test-site/source/javascripts/ender.js +45 -0
- data/spec/test-site/source/javascripts/github.js +37 -0
- data/spec/test-site/source/javascripts/libs/ender.js +1497 -0
- data/spec/test-site/source/javascripts/libs/jXHR.js +85 -0
- data/spec/test-site/source/javascripts/libs/swfobject-dynamic.js +298 -0
- data/spec/test-site/source/javascripts/modernizr-2.0.js +5 -0
- data/spec/test-site/source/javascripts/octopress.js +161 -0
- data/spec/test-site/source/javascripts/pinboard.js +56 -0
- data/spec/test-site/source/javascripts/twitter.js +78 -0
- metadata +475 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
function pinboardNS_fetch_script(url) {
|
2
|
+
//document.writeln('<s'+'cript type="text/javascript" src="' + url + '"></s'+'cript>');
|
3
|
+
(function(){
|
4
|
+
var pinboardLinkroll = document.createElement('script');
|
5
|
+
pinboardLinkroll.type = 'text/javascript';
|
6
|
+
pinboardLinkroll.async = true;
|
7
|
+
pinboardLinkroll.src = url;
|
8
|
+
document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
|
9
|
+
})();
|
10
|
+
}
|
11
|
+
|
12
|
+
function pinboardNS_show_bmarks(r) {
|
13
|
+
var lr = new Pinboard_Linkroll();
|
14
|
+
lr.set_items(r);
|
15
|
+
lr.show_bmarks();
|
16
|
+
}
|
17
|
+
|
18
|
+
function Pinboard_Linkroll() {
|
19
|
+
var items;
|
20
|
+
|
21
|
+
this.set_items = function(i) {
|
22
|
+
this.items = i;
|
23
|
+
}
|
24
|
+
this.show_bmarks = function() {
|
25
|
+
var lines = [];
|
26
|
+
for (var i = 0; i < this.items.length; i++) {
|
27
|
+
var item = this.items[i];
|
28
|
+
var str = this.format_item(item);
|
29
|
+
lines.push(str);
|
30
|
+
}
|
31
|
+
document.getElementById(linkroll).innerHTML = lines.join("\n");
|
32
|
+
}
|
33
|
+
this.cook = function(v) {
|
34
|
+
return v.replace('<', '<').replace('>', '>>');
|
35
|
+
}
|
36
|
+
|
37
|
+
this.format_item = function(it) {
|
38
|
+
var str = "<li class=\"pin-item\">";
|
39
|
+
if (!it.d) { return; }
|
40
|
+
str += "<p><a class=\"pin-title\" href=\"" + this.cook(it.u) + "\">" + this.cook(it.d) + "</a>";
|
41
|
+
if (it.n) {
|
42
|
+
str += "<span class=\"pin-description\">" + this.cook(it.n) + "</span>\n";
|
43
|
+
}
|
44
|
+
if (it.t.length > 0) {
|
45
|
+
for (var i = 0; i < it.t.length; i++) {
|
46
|
+
var tag = it.t[i];
|
47
|
+
str += " <a class=\"pin-tag\" href=\"https://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> ";
|
48
|
+
}
|
49
|
+
}
|
50
|
+
str += "</p></li>\n";
|
51
|
+
return str;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
|
55
|
+
pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
|
56
|
+
|
@@ -0,0 +1,78 @@
|
|
1
|
+
// JSON-P Twitter fetcher for Octopress
|
2
|
+
// (c) Brandon Mathis // MIT License
|
3
|
+
|
4
|
+
/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
|
5
|
+
function prettyDate(time) {
|
6
|
+
if (navigator.appName === 'Microsoft Internet Explorer') {
|
7
|
+
return "<span>∞</span>"; // because IE date parsing isn't fun.
|
8
|
+
}
|
9
|
+
var say = {
|
10
|
+
just_now: " now",
|
11
|
+
minute_ago: "1m",
|
12
|
+
minutes_ago: "m",
|
13
|
+
hour_ago: "1h",
|
14
|
+
hours_ago: "h",
|
15
|
+
yesterday: "1d",
|
16
|
+
days_ago: "d",
|
17
|
+
last_week: "1w",
|
18
|
+
weeks_ago: "w"
|
19
|
+
};
|
20
|
+
|
21
|
+
var current_date = new Date(),
|
22
|
+
current_date_time = current_date.getTime(),
|
23
|
+
current_date_full = current_date_time + (1 * 60000),
|
24
|
+
date = new Date(time),
|
25
|
+
diff = ((current_date_full - date.getTime()) / 1000),
|
26
|
+
day_diff = Math.floor(diff / 86400);
|
27
|
+
|
28
|
+
if (isNaN(day_diff) || day_diff < 0) { return "<span>∞</span>"; }
|
29
|
+
|
30
|
+
return day_diff === 0 && (
|
31
|
+
diff < 60 && say.just_now ||
|
32
|
+
diff < 120 && say.minute_ago ||
|
33
|
+
diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
|
34
|
+
diff < 7200 && say.hour_ago ||
|
35
|
+
diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
|
36
|
+
day_diff === 1 && say.yesterday ||
|
37
|
+
day_diff < 7 && day_diff + say.days_ago ||
|
38
|
+
day_diff === 7 && say.last_week ||
|
39
|
+
day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
|
40
|
+
}
|
41
|
+
|
42
|
+
function linkifyTweet(text, url) {
|
43
|
+
// Linkify urls, usernames, hashtags
|
44
|
+
text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>')
|
45
|
+
.replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>')
|
46
|
+
.replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>');
|
47
|
+
|
48
|
+
// Use twitter's api to replace t.co shortened urls with expanded ones.
|
49
|
+
for (var u in url) {
|
50
|
+
if(url[u].expanded_url != null){
|
51
|
+
var shortUrl = new RegExp(url[u].url, 'g');
|
52
|
+
text = text.replace(shortUrl, url[u].expanded_url);
|
53
|
+
var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g');
|
54
|
+
text = text.replace(shortUrl, ">"+url[u].display_url);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
return text
|
58
|
+
}
|
59
|
+
|
60
|
+
function showTwitterFeed(tweets, twitter_user) {
|
61
|
+
var timeline = document.getElementById('tweets'),
|
62
|
+
content = '';
|
63
|
+
|
64
|
+
for (var t in tweets) {
|
65
|
+
content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>';
|
66
|
+
}
|
67
|
+
timeline.innerHTML = content;
|
68
|
+
}
|
69
|
+
|
70
|
+
function getTwitterFeed(user, count, replies) {
|
71
|
+
count = parseInt(count, 10);
|
72
|
+
$.ajax({
|
73
|
+
url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
|
74
|
+
, type: 'jsonp'
|
75
|
+
, error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
|
76
|
+
, success: function(data) { showTwitterFeed(data.slice(0, count), user); }
|
77
|
+
})
|
78
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Octopress Changelog
|
2
|
+
|
3
|
+
## 2.0
|
4
|
+
|
5
|
+
- Now based on [mojombo/jekyll](http://github.com/mojombo/jekyll)
|
6
|
+
- Sports a semantic HTML5 template
|
7
|
+
- Easy theming with Compass and Sass
|
8
|
+
- A Mobile friendly responsive (320 and up) layout
|
9
|
+
- Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics
|
10
|
+
- Deploy to Github pages or use Rsync
|
11
|
+
- Built in support for POW and Rack servers
|
12
|
+
- Beautiful [Solarized](http://ethanschoonover.com/solarized) syntax highlighting
|
13
|
+
- Super easy setup and configuration
|
14
|
+
|
15
|
+
**New Plugins, Filters, & Generators**
|
16
|
+
|
17
|
+
- **Gist Tag** for easily embedding gists in your posts
|
18
|
+
- **Pygments Cache** makes subsequent compiling much faster
|
19
|
+
- **Include Code Tag** lets you embed external code snippets from your file system and adds a download link
|
20
|
+
- **Pullquote Tag** Generate beautiful semantic pullquotes (no double data) based on Maykel Loomans's [technique](http://miekd.com/articles/pull-quotes-with-html5-and-css/)
|
21
|
+
- **Blockquote Tag** makes it easy to semantically format blockquotes
|
22
|
+
- **Category Generator** gives you archive pages for each category
|
23
|
+
- **Sitemap.xml Generator** for search engines
|
24
|
+
|
25
|
+
## 1.0
|
26
|
+
|
27
|
+
- **No longer supported.**
|
28
|
+
- Jekyll Matured, but Henrik's Jekyll fork did not.
|
29
|
+
- Thanks for all your pull requests, I learned a lot.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
group :development do
|
4
|
+
gem 'rake', '~> 0.9.2'
|
5
|
+
gem 'rack', '~> 1.4.1'
|
6
|
+
gem 'jekyll', '~> 0.11.2'
|
7
|
+
gem 'rdiscount', '~> 1.6.8'
|
8
|
+
gem 'pygments.rb', '~> 0.2.12'
|
9
|
+
gem 'RedCloth', '~> 4.2.9'
|
10
|
+
gem 'haml', '~> 3.1.6'
|
11
|
+
gem 'compass', '~> 0.12.1'
|
12
|
+
gem 'rubypants', '~> 0.2.0'
|
13
|
+
gem 'rb-fsevent', '~> 0.9'
|
14
|
+
gem 'stringex', '~> 1.4.0'
|
15
|
+
gem 'liquid', '~> 2.3.0'
|
16
|
+
end
|
17
|
+
|
18
|
+
gem 'sinatra', '~> 1.3.2'
|
@@ -0,0 +1,69 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
RedCloth (4.2.9)
|
5
|
+
albino (1.3.3)
|
6
|
+
posix-spawn (>= 0.3.6)
|
7
|
+
blankslate (2.1.2.4)
|
8
|
+
chunky_png (1.2.5)
|
9
|
+
classifier (1.3.3)
|
10
|
+
fast-stemmer (>= 1.0.0)
|
11
|
+
compass (0.12.2)
|
12
|
+
chunky_png (~> 1.2)
|
13
|
+
fssm (>= 0.2.7)
|
14
|
+
sass (~> 3.1)
|
15
|
+
directory_watcher (1.4.1)
|
16
|
+
fast-stemmer (1.0.1)
|
17
|
+
ffi (1.0.11)
|
18
|
+
fssm (0.2.9)
|
19
|
+
haml (3.1.6)
|
20
|
+
jekyll (0.11.2)
|
21
|
+
albino (~> 1.3)
|
22
|
+
classifier (~> 1.3)
|
23
|
+
directory_watcher (~> 1.1)
|
24
|
+
kramdown (~> 0.13)
|
25
|
+
liquid (~> 2.3)
|
26
|
+
maruku (~> 0.5)
|
27
|
+
kramdown (0.13.7)
|
28
|
+
liquid (2.3.0)
|
29
|
+
maruku (0.6.0)
|
30
|
+
syntax (>= 1.0.0)
|
31
|
+
posix-spawn (0.3.6)
|
32
|
+
pygments.rb (0.2.13)
|
33
|
+
rubypython (~> 0.5.3)
|
34
|
+
rack (1.4.1)
|
35
|
+
rack-protection (1.2.0)
|
36
|
+
rack
|
37
|
+
rake (0.9.2.2)
|
38
|
+
rb-fsevent (0.9.1)
|
39
|
+
rdiscount (1.6.8)
|
40
|
+
rubypants (0.2.0)
|
41
|
+
rubypython (0.5.3)
|
42
|
+
blankslate (>= 2.1.2.3)
|
43
|
+
ffi (~> 1.0.7)
|
44
|
+
sass (3.1.20)
|
45
|
+
sinatra (1.3.2)
|
46
|
+
rack (~> 1.3, >= 1.3.6)
|
47
|
+
rack-protection (~> 1.2)
|
48
|
+
tilt (~> 1.3, >= 1.3.3)
|
49
|
+
stringex (1.4.0)
|
50
|
+
syntax (1.0.0)
|
51
|
+
tilt (1.3.3)
|
52
|
+
|
53
|
+
PLATFORMS
|
54
|
+
ruby
|
55
|
+
|
56
|
+
DEPENDENCIES
|
57
|
+
RedCloth (~> 4.2.9)
|
58
|
+
compass (~> 0.12.1)
|
59
|
+
haml (~> 3.1.6)
|
60
|
+
jekyll (~> 0.11.2)
|
61
|
+
liquid (~> 2.3.0)
|
62
|
+
pygments.rb (~> 0.2.12)
|
63
|
+
rack (~> 1.4.1)
|
64
|
+
rake (~> 0.9.2)
|
65
|
+
rb-fsevent (~> 0.9)
|
66
|
+
rdiscount (~> 1.6.8)
|
67
|
+
rubypants (~> 0.2.0)
|
68
|
+
sinatra (~> 1.3.2)
|
69
|
+
stringex (~> 1.4.0)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
## What is Octopress?
|
2
|
+
|
3
|
+
Octopress is [Jekyll](https://github.com/mojombo/jekyll) blogging at its finest.
|
4
|
+
|
5
|
+
1. **Octopress sports a clean responsive theme** written in semantic HTML5, focused on readability and friendliness toward mobile devices.
|
6
|
+
2. **Code blogging is easy and beautiful.** Embed code (with [Solarized](http://ethanschoonover.com/solarized) styling) in your posts from gists, jsFiddle or from your filesystem.
|
7
|
+
3. **Third party integration is simple** with built-in support for Twitter, Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics.
|
8
|
+
4. **It's easy to use.** A collection of rake tasks simplifies development and makes deploying a cinch.
|
9
|
+
5. **Ships with great plug-ins** some original and others from the Jekyll community — tested and improved.
|
10
|
+
|
11
|
+
|
12
|
+
## Documentation
|
13
|
+
|
14
|
+
Check out [Octopress.org](http://octopress.org/docs) for guides and documentation.
|
15
|
+
|
16
|
+
|
17
|
+
## Contributing
|
18
|
+
|
19
|
+
We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plugins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases.
|
20
|
+
|
21
|
+
|
22
|
+
## License
|
23
|
+
(The MIT License)
|
24
|
+
|
25
|
+
Copyright © 2009-2011 Brandon Mathis
|
26
|
+
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
28
|
+
|
29
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
30
|
+
|
31
|
+
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
32
|
+
|
33
|
+
|
34
|
+
#### If you want to be awesome.
|
35
|
+
- Proudly display the 'Powered by Octopress' credit in the footer.
|
36
|
+
- Add your site to the Wiki so we can watch the community grow.
|
@@ -0,0 +1,379 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler/setup"
|
3
|
+
require "stringex"
|
4
|
+
|
5
|
+
## -- Rsync Deploy config -- ##
|
6
|
+
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
|
7
|
+
ssh_user = "user@domain.com"
|
8
|
+
ssh_port = "22"
|
9
|
+
document_root = "~/website.com/"
|
10
|
+
rsync_delete = true
|
11
|
+
deploy_default = "rsync"
|
12
|
+
|
13
|
+
# This will be configured for you when you run config_deploy
|
14
|
+
deploy_branch = "gh-pages"
|
15
|
+
|
16
|
+
## -- Misc Configs -- ##
|
17
|
+
|
18
|
+
public_dir = "public" # compiled site directory
|
19
|
+
source_dir = "source" # source file directory
|
20
|
+
blog_index_dir = 'source' # directory for your blog's index page (if you put your index in source/blog/index.html, set this to 'source/blog')
|
21
|
+
deploy_dir = "_deploy" # deploy directory (for Github pages deployment)
|
22
|
+
stash_dir = "_stash" # directory to stash posts for speedy generation
|
23
|
+
posts_dir = "_posts" # directory for blog files
|
24
|
+
themes_dir = ".themes" # directory for blog files
|
25
|
+
new_post_ext = "markdown" # default new post file extension when using the new_post task
|
26
|
+
new_page_ext = "markdown" # default new page file extension when using the new_page task
|
27
|
+
server_port = "4000" # port for preview server eg. localhost:4000
|
28
|
+
|
29
|
+
|
30
|
+
desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
|
31
|
+
task :install, :theme do |t, args|
|
32
|
+
if File.directory?(source_dir) || File.directory?("sass")
|
33
|
+
abort("rake aborted!") if ask("A theme is already installed, proceeding will overwrite existing files. Are you sure?", ['y', 'n']) == 'n'
|
34
|
+
end
|
35
|
+
# copy theme into working Jekyll directories
|
36
|
+
theme = args.theme || 'classic'
|
37
|
+
puts "## Copying "+theme+" theme into ./#{source_dir} and ./sass"
|
38
|
+
mkdir_p source_dir
|
39
|
+
cp_r "#{themes_dir}/#{theme}/source/.", source_dir
|
40
|
+
mkdir_p "sass"
|
41
|
+
cp_r "#{themes_dir}/#{theme}/sass/.", "sass"
|
42
|
+
mkdir_p "#{source_dir}/#{posts_dir}"
|
43
|
+
mkdir_p public_dir
|
44
|
+
end
|
45
|
+
|
46
|
+
#######################
|
47
|
+
# Working with Jekyll #
|
48
|
+
#######################
|
49
|
+
|
50
|
+
desc "Generate jekyll site"
|
51
|
+
task :generate do
|
52
|
+
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
53
|
+
puts "## Generating Site with Jekyll"
|
54
|
+
system "compass compile --css-dir #{source_dir}/stylesheets"
|
55
|
+
system "jekyll"
|
56
|
+
end
|
57
|
+
|
58
|
+
desc "Watch the site and regenerate when it changes"
|
59
|
+
task :watch do
|
60
|
+
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
61
|
+
puts "Starting to watch source with Jekyll and Compass."
|
62
|
+
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
63
|
+
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
|
64
|
+
compassPid = Process.spawn("compass watch")
|
65
|
+
|
66
|
+
trap("INT") {
|
67
|
+
[jekyllPid, compassPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
|
68
|
+
exit 0
|
69
|
+
}
|
70
|
+
|
71
|
+
[jekyllPid, compassPid].each { |pid| Process.wait(pid) }
|
72
|
+
end
|
73
|
+
|
74
|
+
desc "preview the site in a web browser"
|
75
|
+
task :preview do
|
76
|
+
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
77
|
+
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
78
|
+
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
79
|
+
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
|
80
|
+
compassPid = Process.spawn("compass watch")
|
81
|
+
rackupPid = Process.spawn("rackup --port #{server_port}")
|
82
|
+
|
83
|
+
trap("INT") {
|
84
|
+
[jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
|
85
|
+
exit 0
|
86
|
+
}
|
87
|
+
|
88
|
+
[jekyllPid, compassPid, rackupPid].each { |pid| Process.wait(pid) }
|
89
|
+
end
|
90
|
+
|
91
|
+
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
|
92
|
+
desc "Begin a new post in #{source_dir}/#{posts_dir}"
|
93
|
+
task :new_post, :title do |t, args|
|
94
|
+
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
95
|
+
mkdir_p "#{source_dir}/#{posts_dir}"
|
96
|
+
args.with_defaults(:title => 'new-post')
|
97
|
+
title = args.title
|
98
|
+
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
|
99
|
+
if File.exist?(filename)
|
100
|
+
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
101
|
+
end
|
102
|
+
puts "Creating new post: #{filename}"
|
103
|
+
open(filename, 'w') do |post|
|
104
|
+
post.puts "---"
|
105
|
+
post.puts "layout: post"
|
106
|
+
post.puts "title: \"#{title.gsub(/&/,'&')}\""
|
107
|
+
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
|
108
|
+
post.puts "comments: true"
|
109
|
+
post.puts "categories: "
|
110
|
+
post.puts "---"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# usage rake new_page[my-new-page] or rake new_page[my-new-page.html] or rake new_page (defaults to "new-page.markdown")
|
115
|
+
desc "Create a new page in #{source_dir}/(filename)/index.#{new_page_ext}"
|
116
|
+
task :new_page, :filename do |t, args|
|
117
|
+
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
118
|
+
args.with_defaults(:filename => 'new-page')
|
119
|
+
page_dir = [source_dir]
|
120
|
+
if args.filename.downcase =~ /(^.+\/)?(.+)/
|
121
|
+
filename, dot, extension = $2.rpartition('.').reject(&:empty?) # Get filename and extension
|
122
|
+
title = filename
|
123
|
+
page_dir.concat($1.downcase.sub(/^\//, '').split('/')) unless $1.nil? # Add path to page_dir Array
|
124
|
+
if extension.nil?
|
125
|
+
page_dir << filename
|
126
|
+
filename = "index"
|
127
|
+
end
|
128
|
+
extension ||= new_page_ext
|
129
|
+
page_dir = page_dir.map! { |d| d = d.to_url }.join('/') # Sanitize path
|
130
|
+
filename = filename.downcase.to_url
|
131
|
+
|
132
|
+
mkdir_p page_dir
|
133
|
+
file = "#{page_dir}/#{filename}.#{extension}"
|
134
|
+
if File.exist?(file)
|
135
|
+
abort("rake aborted!") if ask("#{file} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
136
|
+
end
|
137
|
+
puts "Creating new page: #{file}"
|
138
|
+
open(file, 'w') do |page|
|
139
|
+
page.puts "---"
|
140
|
+
page.puts "layout: page"
|
141
|
+
page.puts "title: \"#{title}\""
|
142
|
+
page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
|
143
|
+
page.puts "comments: true"
|
144
|
+
page.puts "sharing: true"
|
145
|
+
page.puts "footer: true"
|
146
|
+
page.puts "---"
|
147
|
+
end
|
148
|
+
else
|
149
|
+
puts "Syntax error: #{args.filename} contains unsupported characters"
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# usage rake isolate[my-post]
|
154
|
+
desc "Move all other posts than the one currently being worked on to a temporary stash location (stash) so regenerating the site happens much quicker."
|
155
|
+
task :isolate, :filename do |t, args|
|
156
|
+
stash_dir = "#{source_dir}/#{stash_dir}"
|
157
|
+
FileUtils.mkdir(stash_dir) unless File.exist?(stash_dir)
|
158
|
+
Dir.glob("#{source_dir}/#{posts_dir}/*.*") do |post|
|
159
|
+
FileUtils.mv post, stash_dir unless post.include?(args.filename)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
desc "Move all stashed posts back into the posts directory, ready for site generation."
|
164
|
+
task :integrate do
|
165
|
+
FileUtils.mv Dir.glob("#{source_dir}/#{stash_dir}/*.*"), "#{source_dir}/#{posts_dir}/"
|
166
|
+
end
|
167
|
+
|
168
|
+
desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache"
|
169
|
+
task :clean do
|
170
|
+
rm_rf [".pygments-cache/**", ".gist-cache/**", ".sass-cache/**", "source/stylesheets/screen.css"]
|
171
|
+
end
|
172
|
+
|
173
|
+
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
|
174
|
+
task :update_style, :theme do |t, args|
|
175
|
+
theme = args.theme || 'classic'
|
176
|
+
if File.directory?("sass.old")
|
177
|
+
puts "removed existing sass.old directory"
|
178
|
+
rm_r "sass.old", :secure=>true
|
179
|
+
end
|
180
|
+
mv "sass", "sass.old"
|
181
|
+
puts "## Moved styles into sass.old/"
|
182
|
+
cp_r "#{themes_dir}/"+theme+"/sass/", "sass"
|
183
|
+
cp_r "sass.old/custom/.", "sass/custom"
|
184
|
+
puts "## Updated Sass ##"
|
185
|
+
end
|
186
|
+
|
187
|
+
desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation"
|
188
|
+
task :update_source, :theme do |t, args|
|
189
|
+
theme = args.theme || 'classic'
|
190
|
+
if File.directory?("#{source_dir}.old")
|
191
|
+
puts "## Removed existing #{source_dir}.old directory"
|
192
|
+
rm_r "#{source_dir}.old", :secure=>true
|
193
|
+
end
|
194
|
+
mkdir "#{source_dir}.old"
|
195
|
+
cp_r "#{source_dir}/.", "#{source_dir}.old"
|
196
|
+
puts "## Copied #{source_dir} into #{source_dir}.old/"
|
197
|
+
cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true
|
198
|
+
cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true
|
199
|
+
cp "#{source_dir}.old/favicon.png", source_dir
|
200
|
+
mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
|
201
|
+
cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html")
|
202
|
+
puts "## Updated #{source_dir} ##"
|
203
|
+
end
|
204
|
+
|
205
|
+
##############
|
206
|
+
# Deploying #
|
207
|
+
##############
|
208
|
+
|
209
|
+
desc "Default deploy task"
|
210
|
+
task :deploy do
|
211
|
+
# Check if preview posts exist, which should not be published
|
212
|
+
if File.exists?(".preview-mode")
|
213
|
+
puts "## Found posts in preview mode, regenerating files ..."
|
214
|
+
File.delete(".preview-mode")
|
215
|
+
Rake::Task[:generate].execute
|
216
|
+
end
|
217
|
+
|
218
|
+
Rake::Task[:copydot].invoke(source_dir, public_dir)
|
219
|
+
Rake::Task["#{deploy_default}"].execute
|
220
|
+
end
|
221
|
+
|
222
|
+
desc "Generate website and deploy"
|
223
|
+
task :gen_deploy => [:integrate, :generate, :deploy] do
|
224
|
+
end
|
225
|
+
|
226
|
+
desc "copy dot files for deployment"
|
227
|
+
task :copydot, :source, :dest do |t, args|
|
228
|
+
FileList["#{args.source}/**/.*"].exclude("**/.", "**/..", "**/.DS_Store", "**/._*").each do |file|
|
229
|
+
cp_r file, file.gsub(/#{args.source}/, "#{args.dest}") unless File.directory?(file)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
desc "Deploy website via rsync"
|
234
|
+
task :rsync do
|
235
|
+
exclude = ""
|
236
|
+
if File.exists?('./rsync-exclude')
|
237
|
+
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
|
238
|
+
end
|
239
|
+
puts "## Deploying website via Rsync"
|
240
|
+
ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
|
241
|
+
end
|
242
|
+
|
243
|
+
desc "deploy public directory to github pages"
|
244
|
+
multitask :push do
|
245
|
+
puts "## Deploying branch to Github Pages "
|
246
|
+
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
|
247
|
+
Rake::Task[:copydot].invoke(public_dir, deploy_dir)
|
248
|
+
puts "\n## copying #{public_dir} to #{deploy_dir}"
|
249
|
+
cp_r "#{public_dir}/.", deploy_dir
|
250
|
+
cd "#{deploy_dir}" do
|
251
|
+
system "git add ."
|
252
|
+
system "git add -u"
|
253
|
+
puts "\n## Commiting: Site updated at #{Time.now.utc}"
|
254
|
+
message = "Site updated at #{Time.now.utc}"
|
255
|
+
system "git commit -m \"#{message}\""
|
256
|
+
puts "\n## Pushing generated #{deploy_dir} website"
|
257
|
+
system "git push origin #{deploy_branch} --force"
|
258
|
+
puts "\n## Github Pages deploy complete"
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
desc "Update configurations to support publishing to root or sub directory"
|
263
|
+
task :set_root_dir, :dir do |t, args|
|
264
|
+
puts ">>> !! Please provide a directory, eg. rake config_dir[publishing/subdirectory]" unless args.dir
|
265
|
+
if args.dir
|
266
|
+
if args.dir == "/"
|
267
|
+
dir = ""
|
268
|
+
else
|
269
|
+
dir = "/" + args.dir.sub(/(\/*)(.+)/, "\\2").sub(/\/$/, '');
|
270
|
+
end
|
271
|
+
rakefile = IO.read(__FILE__)
|
272
|
+
rakefile.sub!(/public_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "public_dir\\1=\\2\\3public#{dir}\\3")
|
273
|
+
File.open(__FILE__, 'w') do |f|
|
274
|
+
f.write rakefile
|
275
|
+
end
|
276
|
+
compass_config = IO.read('config.rb')
|
277
|
+
compass_config.sub!(/http_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_path\\1=\\2\\3#{dir}/\\3")
|
278
|
+
compass_config.sub!(/http_images_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_images_path\\1=\\2\\3#{dir}/images\\3")
|
279
|
+
compass_config.sub!(/http_fonts_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_fonts_path\\1=\\2\\3#{dir}/fonts\\3")
|
280
|
+
compass_config.sub!(/css_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "css_dir\\1=\\2\\3public#{dir}/stylesheets\\3")
|
281
|
+
File.open('config.rb', 'w') do |f|
|
282
|
+
f.write compass_config
|
283
|
+
end
|
284
|
+
jekyll_config = IO.read('_config.yml')
|
285
|
+
jekyll_config.sub!(/^destination:.+$/, "destination: public#{dir}")
|
286
|
+
jekyll_config.sub!(/^subscribe_rss:\s*\/.+$/, "subscribe_rss: #{dir}/atom.xml")
|
287
|
+
jekyll_config.sub!(/^root:.*$/, "root: /#{dir.sub(/^\//, '')}")
|
288
|
+
File.open('_config.yml', 'w') do |f|
|
289
|
+
f.write jekyll_config
|
290
|
+
end
|
291
|
+
rm_rf public_dir
|
292
|
+
mkdir_p "#{public_dir}#{dir}"
|
293
|
+
puts "## Site's root directory is now '/#{dir.sub(/^\//, '')}' ##"
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
desc "Set up _deploy folder and deploy branch for Github Pages deployment"
|
298
|
+
task :setup_github_pages, :repo do |t, args|
|
299
|
+
if args.repo
|
300
|
+
repo_url = args.repo
|
301
|
+
else
|
302
|
+
puts "Enter the read/write url for your repository"
|
303
|
+
puts "(For example, 'git@github.com:your_username/your_username.github.com)"
|
304
|
+
repo_url = get_stdin("Repository url: ")
|
305
|
+
end
|
306
|
+
user = repo_url.match(/:([^\/]+)/)[1]
|
307
|
+
branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
|
308
|
+
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
|
309
|
+
unless `git remote -v`.match(/origin.+?octopress.git/).nil?
|
310
|
+
# If octopress is still the origin remote (from cloning) rename it to octopress
|
311
|
+
system "git remote rename origin octopress"
|
312
|
+
if branch == 'master'
|
313
|
+
# If this is a user/organization pages repository, add the correct origin remote
|
314
|
+
# and checkout the source branch for committing changes to the blog source.
|
315
|
+
system "git remote add origin #{repo_url}"
|
316
|
+
puts "Added remote #{repo_url} as origin"
|
317
|
+
system "git config branch.master.remote origin"
|
318
|
+
puts "Set origin as default remote"
|
319
|
+
system "git branch -m master source"
|
320
|
+
puts "Master branch renamed to 'source' for committing your blog source files"
|
321
|
+
else
|
322
|
+
unless !public_dir.match("#{project}").nil?
|
323
|
+
system "rake set_root_dir[#{project}]"
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
327
|
+
url = "http://#{user}.github.com"
|
328
|
+
url += "/#{project}" unless project == ''
|
329
|
+
jekyll_config = IO.read('_config.yml')
|
330
|
+
jekyll_config.sub!(/^url:.*$/, "url: #{url}")
|
331
|
+
File.open('_config.yml', 'w') do |f|
|
332
|
+
f.write jekyll_config
|
333
|
+
end
|
334
|
+
rm_rf deploy_dir
|
335
|
+
mkdir deploy_dir
|
336
|
+
cd "#{deploy_dir}" do
|
337
|
+
system "git init"
|
338
|
+
system "echo 'My Octopress Page is coming soon …' > index.html"
|
339
|
+
system "git add ."
|
340
|
+
system "git commit -m \"Octopress init\""
|
341
|
+
system "git branch -m gh-pages" unless branch == 'master'
|
342
|
+
system "git remote add origin #{repo_url}"
|
343
|
+
rakefile = IO.read(__FILE__)
|
344
|
+
rakefile.sub!(/deploy_branch(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_branch\\1=\\2\\3#{branch}\\3")
|
345
|
+
rakefile.sub!(/deploy_default(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_default\\1=\\2\\3push\\3")
|
346
|
+
File.open(__FILE__, 'w') do |f|
|
347
|
+
f.write rakefile
|
348
|
+
end
|
349
|
+
end
|
350
|
+
puts "\n---\n## Now you can deploy to #{url} with `rake deploy` ##"
|
351
|
+
end
|
352
|
+
|
353
|
+
def ok_failed(condition)
|
354
|
+
if (condition)
|
355
|
+
puts "OK"
|
356
|
+
else
|
357
|
+
puts "FAILED"
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
def get_stdin(message)
|
362
|
+
print message
|
363
|
+
STDIN.gets.chomp
|
364
|
+
end
|
365
|
+
|
366
|
+
def ask(message, valid_options)
|
367
|
+
if valid_options
|
368
|
+
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
|
369
|
+
else
|
370
|
+
answer = get_stdin(message)
|
371
|
+
end
|
372
|
+
answer
|
373
|
+
end
|
374
|
+
|
375
|
+
desc "list tasks"
|
376
|
+
task :list do
|
377
|
+
puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:list]]).join(', ')}"
|
378
|
+
puts "(type rake -T for more detail)\n\n"
|
379
|
+
end
|