Permalink
Browse files

Cleaned out public from repository, updated gitignore, added syntax

highlighting tests, improved syntax highlighting and styling of pre
blocks.
Overriding dynamic gist styling.
Added a plugin for pygments caching which should speed things up
terrifically.
added ender.js as a lightweight way of scripting the DOM, events, etc.
Some general typography and semantic html improvements.
  • Loading branch information...
1 parent c7d5365 commit 8698a276f937cb1cd6f67f7f213e2ea438500d7e @imathis imathis committed May 30, 2011
Showing with 6,017 additions and 1,991 deletions.
  1. +5 −3 .gitignore
  2. +1 −2 Gemfile
  3. +11 −12 Gemfile.lock
  4. +1 −2 Guardfile
  5. +2 −3 Rakefile
  6. +4 −6 _config.yml
  7. +109 −0 _plugins/blockquote.rb
  8. +65 −0 _plugins/category.rb
  9. +6 −1 _plugins/custom_filters.rb
  10. +49 −0 _plugins/iterator.rb
  11. +30 −0 _plugins/pygments_cache_patch.rb
  12. +0 −160 public/2009/11/13/hello-world/index.html
  13. +0 −149 public/2011/03/14/test-post/index.html
  14. +0 −199 public/2011/04/07/test-of-typography/index.html
  15. +0 −154 public/about/index.html
  16. +0 −103 public/atom.xml
  17. BIN public/fonts/adellebasic_bold-webfont.eot
  18. +0 −139 public/fonts/adellebasic_bold-webfont.svg
  19. BIN public/fonts/adellebasic_bold-webfont.ttf
  20. BIN public/fonts/adellebasic_bold-webfont.woff
  21. BIN public/images/code_bg.png
  22. BIN public/images/rss.png
  23. BIN public/images/search.png
  24. +0 −207 public/index.html
  25. +0 −4 public/javascripts/libs/DOMAssistantCompressed-2.8.js
  26. +0 −20 public/javascripts/libs/ios-viewport-scaling-bug-fix.js
  27. +0 −2 public/javascripts/libs/modernizr-1.7.min.js
  28. +0 −8 public/javascripts/libs/respond.js
  29. +0 −5 public/javascripts/libs/selectivizr-min.js
  30. 0 public/javascripts/octopress.js
  31. +0 −52 public/javascripts/pinboard.js
  32. +0 −70 public/javascripts/twitter.js
  33. +0 −35 public/sitemap.xml
  34. +0 −1 public/stylesheets/screen.css
  35. +2 −3 sass/themes/classic/_partials.scss
  36. +1 −1 sass/themes/classic/core/_layout.scss
  37. +33 −34 sass/themes/classic/core/_theme.scss
  38. +6 −5 sass/themes/classic/core/_typography.scss
  39. +15 −0 sass/themes/classic/partials/_pinboard.scss
  40. +0 −12 sass/themes/classic/partials/_shared.scss
  41. +35 −1 sass/themes/classic/partials/_sidebar.scss
  42. +160 −272 sass/themes/classic/partials/_syntax.scss
  43. +47 −13 sass/themes/classic/partials/_twitter.scss
  44. +22 −13 source/_includes/article.html
  45. +3 −3 source/_includes/footer.html
  46. +18 −5 source/_includes/head.html
  47. +2 −2 source/_includes/sidebar.html
  48. +19 −0 source/_layouts/archive_monthly.html
  49. +25 −0 source/_layouts/archive_yearly.html
  50. +6 −9 source/_layouts/default.html
  51. +3 −0 source/_layouts/page.html
  52. +1 −0 source/_layouts/post.html
  53. +3 −3 source/_posts/2009-11-13-hello-world.markdown
  54. +1 −0 source/about.haml
  55. +24 −0 source/archive.html
  56. +0 −1 source/index.html
  57. +0 −4 source/javascripts/libs/DOMAssistantCompressed-2.8.js
  58. +1,497 −0 source/javascripts/libs/ender.js
  59. +8 −0 source/javascripts/libs/ender.min.js
  60. +1,529 −0 source/javascripts/libs/ie/DOMAssistantComplete-2.8.js
  61. +292 −0 source/javascripts/libs/ie/respond.js
  62. +5 −0 source/javascripts/libs/ie/selectivizr-1.0.1.js
  63. +14 −14 source/javascripts/libs/ios-viewport-scaling-bug-fix.js
  64. +85 −0 source/javascripts/libs/jXHR.js
  65. +481 −0 source/javascripts/libs/json2.js
  66. +964 −0 source/javascripts/libs/modernizr-1.7.js
  67. +0 −2 source/javascripts/libs/modernizr-1.7.min.js
  68. +0 −8 source/javascripts/libs/respond.js
  69. +0 −5 source/javascripts/libs/selectivizr-min.js
  70. +2 −6 source/javascripts/pinboard.js
  71. +30 −0 source/javascripts/syntax-helper.js
  72. +4 −10 source/javascripts/twitter.js
  73. +397 −0 source/test/syntax.html
  74. +0 −228 source/test/syntax.markdown
View
@@ -2,9 +2,11 @@ site
.bundle
.DS_Store
.sass-cache
-test
source/_stash
source/stylesheets
+source/javascripts/libs/node_modules
+source/javascripts/libs/syntax-highlighter
vendor/ruby
-vendor/ruby
-vendor/ruby
+_cache
+.gist_cache
+public
View
@@ -1,4 +1,4 @@
-source :rubygems
+source "http://rubygems.org"
gem 'rake'
gem 'jekyll'
@@ -8,6 +8,5 @@ gem 'haml', '>= 3.1'
gem 'compass', '>= 0.11'
gem 'rubypants'
gem 'rb-fsevent'
-gem 'guard-shell'
gem 'guard-livereload'
gem 'serve'
View
@@ -3,7 +3,7 @@ GEM
specs:
RedCloth (4.2.7)
activesupport (3.0.7)
- addressable (2.2.5)
+ addressable (2.2.6)
chunky_png (1.2.0)
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
@@ -24,10 +24,8 @@ GEM
em-websocket (~> 0.2.0)
guard (>= 0.2.2)
json (~> 1.5.1)
- guard-shell (0.1.1)
- guard (>= 0.2.0)
haml (3.1.1)
- i18n (0.4.2)
+ i18n (0.6.0)
jekyll (0.10.0)
classifier (>= 1.3.1)
directory_watcher (>= 1.1.1)
@@ -37,19 +35,21 @@ GEM
liquid (2.2.2)
maruku (0.6.0)
syntax (>= 1.0.0)
- rack (1.2.2)
- rake (0.8.7)
+ rack (1.3.0)
+ rake (0.9.0)
rb-fsevent (0.4.0)
rdiscount (1.6.8)
rubypants (0.2.0)
sass (3.1.1)
- serve (1.0.0)
- activesupport (~> 3.0.1)
- i18n (~> 0.4.1)
- rack (~> 1.2.1)
- tzinfo (~> 0.3.23)
+ serve (1.1.0)
+ activesupport (~> 3.0.7)
+ i18n (~> 0.6.0)
+ rack (~> 1.3.0)
+ tilt (~> 1.3.1)
+ tzinfo (~> 0.3.27)
syntax (1.0.0)
thor (0.14.6)
+ tilt (1.3.2)
tzinfo (0.3.27)
PLATFORMS
@@ -59,7 +59,6 @@ DEPENDENCIES
RedCloth
compass (>= 0.11)
guard-livereload
- guard-shell
haml (>= 3.1)
jekyll
rake
View
@@ -1,4 +1,3 @@
guard 'livereload', :api_version => '1.6' do
- watch(/public\/stylesheets\/(.*)\.css/);
- watch(/public\/(.*)\.(js|html|png|jpg|gif|jpeg|ttf|otf|woff|svg)/i);
+ watch(/public\/\S[css|js|html|png|jpg|gif]/)
end
View
@@ -1,6 +1,5 @@
require "rubygems"
-require "bundler"
-Bundler.setup
+require "bundler/setup"
port = "4000" # preview project port eg. http://localhost:4000
site = "public" # compiled site directory
@@ -104,7 +103,7 @@ end
desc "Watch the site and regenerate when it changes"
task :watch do
- system "trap 'kill $jekyllPid $guardPid $compassPid' Exit; jekyll --auto & jekyllPid=$!; sleep 0.5; compass watch & compassPid=$!; guard & guardPid=$!; wait"
+ system "trap 'kill $jekyllPid $guardPid $compassPid' Exit; jekyll --auto & jekyllPid=$!; compass watch & compassPid=$!; guard & guardPid=$!; wait"
end
desc "generate and deploy website via rsync"
View
@@ -1,16 +1,15 @@
source: source
destination: public
markdown: rdiscount
-pygments: false
-permalink: pretty
+pygments: true
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
+recent_posts: 20
twitter_user: imathis
tweet_count: 3
@@ -19,9 +18,8 @@ show_replies: false
delicious_user:
delicious_count: 3
-pinboard_user: designenthusiast
+pinboard_user: imathis
pinboard_count: 3
-disqus_short_name: imathis
-
+#disqus_short_name: designenthusiast
google_analytics_tracking_id:
View
@@ -0,0 +1,109 @@
+#
+# Author: Josediaz Gonzalez - https://github.com/josegonzalez
+# Source URL: https://github.com/josegonzalez/josediazgonzalez.com/blob/master/_plugins/blockquote.rb
+# Modified by Brandon Mathis
+#
+require './_plugins/titlecase.rb'
+module Jekyll
+
+ # Outputs a string with a given attribution as a quote
+ #
+ # {% blockquote John Paul Jones %}
+ # Monkeys!
+ # {% endblockquote %}
+ # ...
+ # <blockquote>
+ # Monkeys!
+ # <br />
+ # John Paul Jones
+ # </blockquote>
+ #
+ class Blockquote < Liquid::Block
+ FullCiteWithTitle = /([\w\s]+)(https?:\/\/)(\S+\s)([\w\s]+)/i
+ FullCite = /([\w\s]+)(https?:\/\/)(\S+)/i
+ Author = /([\w\s]+)/
+
+ def initialize(tag_name, markup, tokens)
+ @by = nil
+ @source = nil
+ @title = nil
+ if markup =~ FullCiteWithTitle
+ @by = $1
+ @source = $2 + $3
+ @title = $4.titlecase
+ elsif markup =~ FullCite
+ @by = $1
+ @source = $2 + $3
+ elsif markup =~ Author
+ @by = $1
+ end
+ super
+ end
+
+ def render(context)
+ output = super
+ if @by.nil?
+ '<blockquote><p>' + output.join + '</p></blockquote>'
+ elsif !@title.nil?
+ '<blockquote><p>' + output.join + '</p></blockquote>' + '<p><cite><strong>' + @by + '</strong>' + '<a class="source" href="' + @source + '">' + @title + '</a></cite></p>'
+ elsif !@source.nil?
+ '<blockquote><p>' + output.join + '</p></blockquote>' + '<p><cite><strong>' + @by + '</strong>' + '<a class="source" href="' + @source + '">source</a></cite></p>'
+ else
+ '<blockquote><p>' + output.join + '</p></blockquote>' + '<p><cite><strong>' + @by + '</strong></cite></p>'
+ end
+ end
+ end
+
+ # Outputs a string with a given attribution as a pullquote
+ #
+ # {% blockquote John Paul Jones %}
+ # Monkeys!
+ # {% endblockquote %}
+ # ...
+ # <blockquote class="pullquote">
+ # Monkeys!
+ # <br />
+ # John Paul Jones
+ # </blockquote>
+ #
+ class Pullquote < Liquid::Block
+ FullCiteWithTitle = /([\w\s]+)(http:\/\/|https:\/\/)(\S+)([\w\s]+)/i
+ FullCite = /([\w\s]+)(http:\/\/|https:\/\/)(\S+)/i
+ Author = /([\w\s]+)/
+
+ def initialize(tag_name, markup, tokens)
+ @by = nil
+ @source = nil
+ @title = nil
+ if markup =~ FullCiteWithTitle
+ @by = $1
+ @source = $2 + $3
+ @title = $4
+ elsif markup =~ FullCite
+ @by = $1
+ @source = $2 + $3
+ elsif markup =~ Author
+ @by = $1
+ end
+ super
+ end
+
+ def render(context)
+ output = super
+ if @by.nil?
+ '<blockquote class="pullquote"><p>' + output.join + '</p></blockquote>'
+ elsif @title
+ '<blockquote class="pullquote"><p>' + output.join + '</p></blockquote>' + '<p><cite><strong>' + @by + '</strong>' + ' <a class="source" href="' + @source + '">' + @title + '</a></cite></p>'
+ elsif @source
+ '<blockquote class="pullquote"><p>' + output.join + '</p></blockquote>' + '<p><cite><strong>' + @by + '</strong>' + ' <a class="source" href="' + @source + '">source</a></cite></p>'
+ elsif @by
+ '<blockquote class="pullquote"><p>' + output.join + '</p></blockquote>' + '<p><cite><strong>' + @by + '</strong></cite></p>'
+ end
+ end
+ end
+end
+
+Liquid::Template.register_tag('blockquote', Jekyll::Blockquote)
+Liquid::Template.register_tag('pullquote', Jekyll::Pullquote)
+
+
View
@@ -0,0 +1,65 @@
+module Jekyll
+
+ class CategoryIndex < Page
+ def initialize(site, base, dir, category)
+ @site = site
+ @base = base
+ @dir = dir
+ @name = 'index.html'
+
+ self.process(@name)
+ self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
+ self.data['category'] = category
+
+ category_title_prefix = site.config['category_title_prefix'] || 'Category: '
+ self.data['title'] = "#{category_title_prefix}#{category}"
+ end
+ end
+
+ class CategoryList < Page
+ def initialize(site, base, dir, categories)
+ @site = site
+ @base = base
+ @dir = dir
+ @name = 'index.html'
+
+ self.process(@name)
+ self.read_yaml(File.join(base, '_layouts'), 'category_list.html')
+ self.data['categories'] = categories
+ end
+ end
+
+ class CategoryGenerator < Generator
+ safe true
+
+ def generate(site)
+ if site.layouts.key? 'category_index'
+ dir = site.config['category_dir'] || 'categories'
+ site.categories.keys.each do |category|
+ write_category_index(site, File.join(dir, category.gsub(/\s/, "-").gsub(/[^\w-]/, '').downcase), category)
+ end
+ end
+
+ if site.layouts.key? 'category_list'
+ dir = site.config['category_dir'] || 'categories'
+ write_category_list(site, dir, site.categories.keys.sort)
+ end
+ end
+
+ def write_category_index(site, dir, category)
+ index = CategoryIndex.new(site, site.source, dir, category)
+ index.render(site.layouts, site.site_payload)
+ index.write(site.dest)
+ site.static_files << index
+ end
+
+ def write_category_list(site, dir, categories)
+ index = CategoryList.new(site, site.source, dir, categories)
+ index.render(site.layouts, site.site_payload)
+ index.write(site.dest)
+ site.static_files << index
+ end
+ end
+
+end
+
@@ -50,6 +50,11 @@ def ordinal(number)
end
end
end
+ #YearlyPost = Struct.new('YearlyPost', :year, :posts)
+ def yearly_posts(site)
+ #site.posts.reverse.group_by { |p| p.date.strftime("%Y") }.map { |k,v| YearlyPost.new(k,v) }
+ site
+ end
end
-
Liquid::Template.register_filter OctopressFilters
+
View
@@ -0,0 +1,49 @@
+##
+## Author: Jose Gonzalez - https://github.com/josegonzalez
+## Source URL: https://github.com/josegonzalez/josediazgonzalez.com/blob/master/_plugins/iterator.rb
+##
+
+#module Jekyll
+ #class Site
+ #alias_method :orig_site_payload, :site_payload
+
+ ## Constuct an array of hashes that will allow the user, using Liquid, to
+ ## iterate through the keys of _kv_hash_ and be able to iterate through the
+ ## elements under each key.
+ ##
+ ## Example:
+ ## categories = { 'Ruby' => [<Post>, <Post>] }
+ ## make_iterable(categories, :index => 'name', :items => 'posts')
+ ## Will allow the user to iterate through all categories and then iterate
+ ## though each post in the current category like so:
+ ## {% for category in site.categories %}
+ ## h1. {{ category.name }}
+ ## <ul>
+ ## {% for post in category.posts %}
+ ## <li>{{ post.title }}</li>
+ ## {% endfor %}
+ ## </ul>
+ ## {% endfor %}
+ ##
+ ## Returns [ {<index> => <kv_hash_key>, <items> => kv_hash[<kv_hash_key>]}, ... ]
+
+ #def make_iterable(kv_hash, options)
+ #options = {:index => 'name', :items => 'items'}.merge(options)
+ #result = []
+ #kv_hash.sort.each do |key, value|
+ #result << { options[:index] => key, options[:items] => value }
+ #end
+ #result
+ #end
+
+ #def site_payload
+ #payload = orig_site_payload
+ #payload['site']['iterable'].merge!({
+ #'categories' => make_iterable(self.categories, :index => 'name', :items => 'posts'),
+ #'tags' => make_iterable(self.tags, :index => 'name', :items => 'posts')
+ #})
+ #payload
+ #end
+
+ #end
+#end
Oops, something went wrong.

0 comments on commit 8698a27

Please sign in to comment.