From c7d5365f81552cae16bbb91696ca3e67b4a0a2e9 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 15 May 2011 18:33:00 -0400 Subject: [PATCH] major refactoring, improved file watching, changed site to public to support rack via pow (http://pow.cx) also implemented the basics of a 320 and up design refresh on the classic theme. This should make it great for mobile reading --- .ackrc | 1 + .gitignore | 2 + Gemfile | 6 +- Gemfile.lock | 45 +- Guardfile | 9 +- Rakefile | 2 +- _config.yml | 9 +- _plugins/custom_filters.rb | 11 +- _plugins/generate_sitemap.rb | 11 +- _plugins/generate_styles.rb | 1 + config.rb | 2 +- public/2009/11/13/hello-world/index.html | 107 +- public/2011/03/14/test-post/index.html | 105 +- .../2011/04/07/test-of-typography/index.html | 105 +- public/about/index.html | 113 +- public/atom.xml | 8 +- public/images/rss.png | Bin 6905 -> 504 bytes public/images/search.png | Bin 0 -> 333 bytes public/images/search_bg.png | Bin 1058 -> 0 bytes public/index.html | 120 +- .../libs/DOMAssistantCompressed-2.8.js | 4 + .../libs/ios-viewport-scaling-bug-fix.js | 20 + public/javascripts/libs/modernizr-1.7.min.js | 2 + public/javascripts/libs/respond.js | 8 + public/javascripts/libs/selectivizr-min.js | 5 + public/javascripts/mootools-1.2.4.2-more.js | 100 - public/javascripts/mootools-more-1.3.1.1.js | 1322 ---- public/javascripts/mootools-yui-compressed.js | 5492 ----------------- public/javascripts/octopress.js | 76 - public/javascripts/pinboard.js | 2 +- public/javascripts/twitter.js | 108 +- public/sitemap.xml | 24 +- public/stylesheets/screen.css | 4 +- {source/sass => sass}/screen.scss | 2 +- .../themes/classic/_partials.scss | 10 +- .../sass => sass}/themes/classic/_style.scss | 4 +- sass/themes/classic/core/_layout.scss | 94 + .../themes/classic/core/_theme.scss | 0 .../themes/classic/core/_typography.scss | 21 +- sass/themes/classic/media/_480.scss | 16 + sass/themes/classic/media/_768.scss | 16 + sass/themes/classic/media/_992.scss | 3 + .../themes/classic/partials/_blog.scss | 3 - .../themes/classic/partials/_footer.scss | 0 .../themes/classic/partials/_header.scss | 6 +- sass/themes/classic/partials/_navigation.scss | 67 + .../themes/classic/partials/_page.scss | 4 +- sass/themes/classic/partials/_search.scss | 0 .../themes/classic/partials/_shared.scss | 0 sass/themes/classic/partials/_sidebar.scss | 20 + .../themes/classic/partials/_syntax.scss | 0 .../themes/classic/partials/_twitter.scss | 0 source/_includes/article.html | 15 +- source/_includes/delicious.html | 2 +- source/_includes/head.html | 27 +- source/_includes/header.html | 9 - source/_includes/navigation.html | 8 +- source/_includes/pinboard.html | 2 +- source/_includes/sidebar.html | 8 +- source/_includes/twitter.html | 12 +- source/_layouts/default.html | 23 +- source/_layouts/page.html | 10 + source/about.haml | 6 +- source/images/rss.png | Bin 6905 -> 504 bytes source/images/search.png | Bin 0 -> 333 bytes source/images/search_bg.png | Bin 1058 -> 0 bytes .../libs/DOMAssistantCompressed-2.8.js | 4 + .../libs/ios-viewport-scaling-bug-fix.js | 20 + source/javascripts/libs/modernizr-1.7.min.js | 2 + source/javascripts/libs/respond.js | 8 + source/javascripts/libs/selectivizr-min.js | 5 + source/javascripts/mootools-1.2.4.2-more.js | 100 - source/javascripts/mootools-more-1.3.1.1.js | 1322 ---- source/javascripts/mootools-yui-compressed.js | 5492 ----------------- source/javascripts/octopress.js | 76 - source/javascripts/pinboard.js | 2 +- source/javascripts/twitter.js | 108 +- source/sass/themes/classic/core/_layout.scss | 91 - .../themes/classic/partials/_navigation.scss | 30 - .../sass/themes/classic/partials/_search.scss | 19 - .../themes/classic/partials/_sidebar.scss | 38 - source/test/typography.haml | 11 +- 82 files changed, 963 insertions(+), 14577 deletions(-) create mode 100644 .ackrc create mode 100644 _plugins/generate_styles.rb create mode 100644 public/images/search.png delete mode 100644 public/images/search_bg.png create mode 100644 public/javascripts/libs/DOMAssistantCompressed-2.8.js create mode 100644 public/javascripts/libs/ios-viewport-scaling-bug-fix.js create mode 100644 public/javascripts/libs/modernizr-1.7.min.js create mode 100644 public/javascripts/libs/respond.js create mode 100644 public/javascripts/libs/selectivizr-min.js delete mode 100644 public/javascripts/mootools-1.2.4.2-more.js delete mode 100644 public/javascripts/mootools-more-1.3.1.1.js delete mode 100644 public/javascripts/mootools-yui-compressed.js rename {source/sass => sass}/screen.scss (90%) rename {source/sass => sass}/themes/classic/_partials.scss (55%) rename {source/sass => sass}/themes/classic/_style.scss (76%) create mode 100644 sass/themes/classic/core/_layout.scss rename {source/sass => sass}/themes/classic/core/_theme.scss (100%) rename {source/sass => sass}/themes/classic/core/_typography.scss (88%) create mode 100644 sass/themes/classic/media/_480.scss create mode 100644 sass/themes/classic/media/_768.scss create mode 100644 sass/themes/classic/media/_992.scss rename {source/sass => sass}/themes/classic/partials/_blog.scss (89%) rename {source/sass => sass}/themes/classic/partials/_footer.scss (100%) rename {source/sass => sass}/themes/classic/partials/_header.scss (79%) create mode 100644 sass/themes/classic/partials/_navigation.scss rename {source/sass => sass}/themes/classic/partials/_page.scss (62%) create mode 100644 sass/themes/classic/partials/_search.scss rename {source/sass => sass}/themes/classic/partials/_shared.scss (100%) create mode 100644 sass/themes/classic/partials/_sidebar.scss rename {source/sass => sass}/themes/classic/partials/_syntax.scss (100%) rename {source/sass => sass}/themes/classic/partials/_twitter.scss (100%) create mode 100644 source/_layouts/page.html create mode 100644 source/images/search.png delete mode 100644 source/images/search_bg.png create mode 100644 source/javascripts/libs/DOMAssistantCompressed-2.8.js create mode 100644 source/javascripts/libs/ios-viewport-scaling-bug-fix.js create mode 100644 source/javascripts/libs/modernizr-1.7.min.js create mode 100644 source/javascripts/libs/respond.js create mode 100755 source/javascripts/libs/selectivizr-min.js delete mode 100644 source/javascripts/mootools-1.2.4.2-more.js delete mode 100644 source/javascripts/mootools-more-1.3.1.1.js delete mode 100644 source/javascripts/mootools-yui-compressed.js delete mode 100644 source/sass/themes/classic/core/_layout.scss delete mode 100644 source/sass/themes/classic/partials/_navigation.scss delete mode 100644 source/sass/themes/classic/partials/_search.scss delete mode 100644 source/sass/themes/classic/partials/_sidebar.scss diff --git a/.ackrc b/.ackrc new file mode 100644 index 0000000..c9fdae0 --- /dev/null +++ b/.ackrc @@ -0,0 +1 @@ +--ignore-dir=public diff --git a/.gitignore b/.gitignore index 0e7bf6c..8642c40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,7 @@ site .sass-cache test source/_stash +source/stylesheets +vendor/ruby vendor/ruby vendor/ruby diff --git a/Gemfile b/Gemfile index 29ed4ae..f904d26 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,13 @@ source :rubygems +gem 'rake' gem 'jekyll' gem 'rdiscount' gem 'RedCloth' -gem "haml", "3.1.0.alpha.147" -gem 'compass', '0.11.beta.5' +gem 'haml', '>= 3.1' +gem 'compass', '>= 0.11' gem 'rubypants' gem 'rb-fsevent' gem 'guard-shell' gem 'guard-livereload' gem 'serve' -gem 'rake' diff --git a/Gemfile.lock b/Gemfile.lock index 80c455d..e88c863 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,53 +1,48 @@ GEM remote: http://rubygems.org/ specs: - RedCloth (4.2.3) - activesupport (3.0.5) - addressable (2.2.4) - chunky_png (1.1.0) + RedCloth (4.2.7) + activesupport (3.0.7) + addressable (2.2.5) + chunky_png (1.2.0) classifier (1.3.3) fast-stemmer (>= 1.0.0) - compass (0.11.beta.5) - chunky_png (~> 1.1.0) - sass (>= 3.1.0.alpha.249) - configuration (1.2.0) - directory_watcher (1.3.2) + compass (0.11.1) + chunky_png (~> 1.1) + fssm (>= 0.2.7) + sass (~> 3.1) + directory_watcher (1.4.0) em-websocket (0.2.1) addressable (>= 2.1.1) eventmachine (>= 0.12.9) eventmachine (0.12.10) fast-stemmer (1.0.0) - guard (0.3.0) - open_gem (~> 1.4.2) + fssm (0.2.7) + guard (0.3.4) thor (~> 0.14.6) - guard-livereload (0.1.9) + guard-livereload (0.1.11) em-websocket (~> 0.2.0) guard (>= 0.2.2) - json (~> 1.4.6) + json (~> 1.5.1) guard-shell (0.1.1) guard (>= 0.2.0) - haml (3.1.0.alpha.147) + haml (3.1.1) i18n (0.4.2) jekyll (0.10.0) classifier (>= 1.3.1) directory_watcher (>= 1.1.1) liquid (>= 1.9.0) maruku (>= 0.5.9) - json (1.4.6) - launchy (0.3.7) - configuration (>= 0.0.5) - rake (>= 0.8.1) + json (1.5.1) liquid (2.2.2) maruku (0.6.0) syntax (>= 1.0.0) - open_gem (1.4.2) - launchy (~> 0.3.5) - rack (1.2.1) + rack (1.2.2) rake (0.8.7) rb-fsevent (0.4.0) rdiscount (1.6.8) rubypants (0.2.0) - sass (3.1.0.alpha.252) + sass (3.1.1) serve (1.0.0) activesupport (~> 3.0.1) i18n (~> 0.4.1) @@ -55,17 +50,17 @@ GEM tzinfo (~> 0.3.23) syntax (1.0.0) thor (0.14.6) - tzinfo (0.3.24) + tzinfo (0.3.27) PLATFORMS ruby DEPENDENCIES RedCloth - compass (= 0.11.beta.5) + compass (>= 0.11) guard-livereload guard-shell - haml (= 3.1.0.alpha.147) + haml (>= 3.1) jekyll rake rb-fsevent diff --git a/Guardfile b/Guardfile index 97f4a2b..9fe2858 100644 --- a/Guardfile +++ b/Guardfile @@ -1,9 +1,4 @@ -guard 'shell' do - watch(/source\/sass\/(.*)\.s[ac]ss/) {|m| `compass compile` } - watch(%r{public/.+\.(js|html)}) {|m| `compass compile` } -end - guard 'livereload', :api_version => '1.6' do - watch(%r{public/.+\.(css)}) - watch(%r{public/.+\.(js|html)}) + watch(/public\/stylesheets\/(.*)\.css/); + watch(/public\/(.*)\.(js|html|png|jpg|gif|jpeg|ttf|otf|woff|svg)/i); end diff --git a/Rakefile b/Rakefile index 634f6d4..6834e4a 100644 --- a/Rakefile +++ b/Rakefile @@ -104,7 +104,7 @@ end desc "Watch the site and regenerate when it changes" task :watch do - system "trap 'kill $jekyllPid $guardPid' Exit; guard & guardPid=$!; jekyll --auto & jekyllPid=$!; wait" + system "trap 'kill $jekyllPid $guardPid $compassPid' Exit; jekyll --auto & jekyllPid=$!; sleep 0.5; compass watch & compassPid=$!; guard & guardPid=$!; wait" end desc "generate and deploy website via rsync" diff --git a/_config.yml b/_config.yml index 34e99b8..0ee0141 100644 --- a/_config.yml +++ b/_config.yml @@ -1,14 +1,14 @@ source: source destination: public -exclude: sass, *.scss markdown: rdiscount -pygments: true +pygments: false permalink: pretty url: http://yoursite.com title: My Octopress Blog author: Your Name email: you@domain.com #Add your email (optional) for the atom feed +simple_search: http://google.com/search recent_posts: 10 @@ -19,10 +19,9 @@ show_replies: false delicious_user: delicious_count: 3 -pinboard_user: imathis +pinboard_user: designenthusiast pinboard_count: 3 -disqus_short_name: +disqus_short_name: imathis -google_custom_search_id: google_analytics_tracking_id: diff --git a/_plugins/custom_filters.rb b/_plugins/custom_filters.rb index 2c58e67..84f1caa 100644 --- a/_plugins/custom_filters.rb +++ b/_plugins/custom_filters.rb @@ -15,6 +15,11 @@ module OctopressFilters $1+url+$3 end end + def search_url(input) + input.gsub /(http:\/\/)(\S+)/ do + $2 + end + end def smart_quotes(input) require 'rubypants' RubyPants.new(input).to_html @@ -23,10 +28,14 @@ module OctopressFilters require 'titlecase' input.titlecase end - def ordinalize(date) + def datetime(date) if date.class == String date = Time.parse(date) end + date + end + def ordinalize(date) + date = datetime(date) "#{date.strftime('%B')} #{ordinal(date.strftime('%e').to_i)}, #{date.strftime('%Y')}" end def ordinal(number) diff --git a/_plugins/generate_sitemap.rb b/_plugins/generate_sitemap.rb index 488a992..4d580c4 100644 --- a/_plugins/generate_sitemap.rb +++ b/_plugins/generate_sitemap.rb @@ -44,7 +44,6 @@ module Jekyll priority :low # Domain that you are generating the sitemap for - update this to match your site. - BASE_URL = 'http://recursive-design.com' # Generates the sitemap.xml file. # @@ -82,6 +81,8 @@ module Jekyll def generate_content(site) result = '' + base_url = site.config['url'] + # First, try to find any stand-alone pages. site.pages.each{ |page| path = page.subfolder + '/' + page.name @@ -93,14 +94,14 @@ module Jekyll end unless path =~/error/ - result += entry(path, mod_date) + result += entry(base_url, path, mod_date) end } # Next, find all the posts. posts = site.site_payload['site']['posts'] for post in posts do - result += entry(post.id, post.date) + result += entry(base_url, post.id, post.date) end result @@ -115,12 +116,12 @@ module Jekyll # # +path+ is the URL path to the page. # +date+ is the date the file was modified (in the case of regular pages), or published (for blog posts). - def entry(path, date) + def entry(base_url, path, date) # Force extensions to .html from markdown, textile. path = path.gsub(/\.(markdown|textile)$/i, '.html') " - #{BASE_URL}#{path} + #{base_url}#{path} #{date.strftime("%Y-%m-%d")} " end diff --git a/_plugins/generate_styles.rb b/_plugins/generate_styles.rb new file mode 100644 index 0000000..e1819f8 --- /dev/null +++ b/_plugins/generate_styles.rb @@ -0,0 +1 @@ +system "sleep 0.5; compass compile --css-dir source/stylesheets" diff --git a/config.rb b/config.rb index 23a73c8..164a834 100644 --- a/config.rb +++ b/config.rb @@ -3,7 +3,7 @@ project_type = :stand_alone # Set this to the root of your project when deployed: http_path = "/" css_dir = "public/stylesheets" -sass_dir = "source/sass" +sass_dir = "sass" images_dir = "source/images" http_images_dir = "images" fonts_dir = "source/fonts" diff --git a/public/2009/11/13/hello-world/index.html b/public/2009/11/13/hello-world/index.html index cd0e939..b67552e 100644 --- a/public/2009/11/13/hello-world/index.html +++ b/public/2009/11/13/hello-world/index.html @@ -1,49 +1,62 @@ - + + + + + + + Hello World! I'm Octopress! - My Octopress Blog - + + + + + + + + - - - - - - - - - + + + - +

My Octopress Blog

-
-