Permalink
Browse files

initial import

  • Loading branch information...
0 parents commit 99b82e19790c9fc90c99b73a18e23e5def21ce04 @narkisr committed Apr 13, 2012
Showing with 12,686 additions and 0 deletions.
  1. +1 −0 404.html
  2. +14 −0 README.md
  3. +294 −0 Rakefile
  4. +105 −0 _config.yml
  5. +12 −0 _includes/JB/analytics
  6. +12 −0 _includes/JB/analytics-providers/getclicky
  7. +11 −0 _includes/JB/analytics-providers/google
  8. +37 −0 _includes/JB/categories_list
  9. +16 −0 _includes/JB/comments
  10. +13 −0 _includes/JB/comments-providers/disqus
  11. +1 −0 _includes/JB/comments-providers/facebook
  12. +6 −0 _includes/JB/comments-providers/intensedebate
  13. +6 −0 _includes/JB/comments-providers/livefyre
  14. +32 −0 _includes/JB/liquid_raw
  15. +37 −0 _includes/JB/pages_list
  16. +55 −0 _includes/JB/posts_collate
  17. +22 −0 _includes/JB/setup
  18. +8 −0 _includes/JB/sharing
  19. +33 −0 _includes/JB/tags_list
  20. +25 −0 _includes/custom/analytics
  21. +11 −0 _includes/custom/sharing
  22. +8 −0 _includes/mixpanel
  23. +16 −0 _includes/pages_icons
  24. +30 −0 _includes/sidebar.html
  25. +123 −0 _includes/themes/jade-doc/default.html
  26. +3 −0 _includes/themes/jade-doc/page.html
  27. +10 −0 _includes/themes/jade-doc/post.html
  28. +2 −0 _includes/themes/jade-doc/settings.yml
  29. +82 −0 _includes/themes/the-minimum/default.html
  30. +28 −0 _includes/themes/the-minimum/page.html
  31. +71 −0 _includes/themes/the-minimum/post.html
  32. +2 −0 _includes/themes/the-minimum/settings.yml
  33. +83 −0 _includes/themes/the-program/default.html
  34. +28 −0 _includes/themes/the-program/page.html
  35. +71 −0 _includes/themes/the-program/post.html
  36. +2 −0 _includes/themes/the-program/settings.yml
  37. +76 −0 _includes/themes/twitter2/default.html
  38. +34 −0 _includes/themes/twitter2/landing.html
  39. +9 −0 _includes/themes/twitter2/page.html
  40. +15 −0 _includes/themes/twitter2/post.html
  41. +2 −0 _includes/themes/twitter2/settings.yml
  42. +8 −0 _includes/themes/twitter2/splash.html
  43. +6 −0 _layouts/default.html
  44. +5 −0 _layouts/landing.html
  45. +5 −0 _layouts/page.html
  46. +5 −0 _layouts/post.html
  47. +5 −0 _layouts/splash.html
  48. +38 −0 _plugins/debug.rb
  49. +14 −0 _posts/2012-04-13-lambda-pod-introduction-episode.md
  50. +1 −0 _theme_packages/the-minimum
  51. +1 −0 _theme_packages/the-program
  52. +9 −0 archive.html
  53. +96 −0 assets/app.js
  54. BIN assets/images/code_bg.png
  55. BIN assets/images/noise.png
  56. +353 −0 assets/themes/jade-doc/css/bootstrap-1.4.0-min.css
  57. +148 −0 assets/themes/jade-doc/css/style.css
  58. +489 −0 assets/themes/jade-doc/css/syntax.css
  59. +365 −0 assets/themes/the-minimum/css/_layout.less
  60. +213 −0 assets/themes/the-minimum/css/_less-base.less
  61. +153 −0 assets/themes/the-minimum/css/base.css
  62. +49 −0 assets/themes/the-minimum/css/helper.css
  63. +38 −0 assets/themes/the-minimum/css/module.css
  64. +852 −0 assets/themes/the-minimum/css/style.css
  65. +321 −0 assets/themes/the-minimum/css/style.less
  66. +68 −0 assets/themes/the-minimum/css/syntaxhighlighter.css
  67. BIN assets/themes/the-minimum/font/Junction-webfont.eot
  68. +177 −0 assets/themes/the-minimum/font/Junction-webfont.svg
  69. BIN assets/themes/the-minimum/font/Junction-webfont.ttf
  70. BIN assets/themes/the-minimum/font/Junction-webfont.woff
  71. +34 −0 assets/themes/the-minimum/readme.markdown
  72. BIN assets/themes/the-minimum/skin/100-90-5-monochrome.png
  73. +153 −0 assets/themes/the-program/css/_base.less
  74. +53 −0 assets/themes/the-program/css/_helper.less
  75. +197 −0 assets/themes/the-program/css/_less-base.less
  76. +235 −0 assets/themes/the-program/css/_mediaqueries.less
  77. +38 −0 assets/themes/the-program/css/_module.less
  78. +68 −0 assets/themes/the-program/css/_syntaxhighlighter.less
  79. +1,484 −0 assets/themes/the-program/css/style.css
  80. +313 −0 assets/themes/the-program/css/style.less
  81. BIN assets/themes/the-program/font/UbuntuMono-B-webfont.eot
  82. +231 −0 assets/themes/the-program/font/UbuntuMono-B-webfont.svg
  83. BIN assets/themes/the-program/font/UbuntuMono-B-webfont.ttf
  84. BIN assets/themes/the-program/font/UbuntuMono-B-webfont.woff
  85. BIN assets/themes/the-program/skin/100-90-5-monochrome.png
  86. +3,327 −0 assets/themes/twitter2/css/bootstrap.css
  87. +616 −0 assets/themes/twitter2/css/bootstrap.min.css
  88. +160 −0 assets/themes/twitter2/css/custom.css
  89. +489 −0 assets/themes/twitter2/css/syntax.css
  90. BIN assets/themes/twitter2/img/glyphicons-halflings-white.png
  91. BIN assets/themes/twitter2/img/glyphicons-halflings.png
  92. +4 −0 assets/themes/twitter2/js/jquery.min.js
  93. +28 −0 atom.xml
  94. +21 −0 categories.html
  95. +1 −0 google6057510825a93aff.html
  96. +134 −0 index.md
  97. +26 −0 pages.html
  98. +44 −0 project/about.md
  99. +63 −0 project/contributing.md
  100. +48 −0 project/roadmap.md
  101. +27 −0 rss.xml
  102. +7 −0 sitemap.txt
  103. +20 −0 tags.html
@@ -0,0 +1 @@
+Sorry this page does not exist =(
@@ -0,0 +1,14 @@
+# Jekyll-Bootstrap
+
+The quickest and most hassle-free way to get your new Jekyll powered website up and running.
+100% compatible with GitHub pages.
+
+<http://jekyllbootstrap.com>
+
+## Development
+
+Development is active!
+
+## License
+
+[Creative Commons](http://creativecommons.org/licenses/by-nc-sa/3.0/)
294 Rakefile
@@ -0,0 +1,294 @@
+require "rubygems"
+require 'rake'
+require 'yaml'
+
+SOURCE = "."
+CONFIG = {
+ 'version' => "0.2.0",
+ 'themes' => File.join(SOURCE, "_includes", "themes"),
+ 'layouts' => File.join(SOURCE, "_layouts"),
+ 'posts' => File.join(SOURCE, "_posts"),
+ 'post_ext' => "md",
+ 'theme_package_version' => "0.1.0"
+}
+
+# Path configuration helper
+module JB
+ class Path
+ SOURCE = "."
+ Paths = {
+ :layouts => "_layouts",
+ :themes => "_includes/themes",
+ :theme_assets => "assets/themes",
+ :theme_packages => "_theme_packages",
+ :posts => "_posts"
+ }
+
+ def self.base
+ SOURCE
+ end
+
+ # build a path relative to configured path settings.
+ def self.build(path, opts = {})
+ opts[:root] ||= SOURCE
+ path = "#{opts[:root]}/#{Paths[path.to_sym]}/#{opts[:node]}".split("/")
+ path.compact!
+ File.__send__ :join, path
+ end
+
+ end #Path
+end #JB
+
+# Usage: rake post title="A Title"
+desc "Begin a new post in #{CONFIG['posts']}"
+task :post do
+ abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
+ title = ENV["title"] || "new-post"
+ slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
+ filename = File.join(CONFIG['posts'], "#{Time.now.strftime('%Y-%m-%d')}-#{slug}.#{CONFIG['post_ext']}")
+ if File.exist?(filename)
+ abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ end
+
+ puts "Creating new post: #{filename}"
+ open(filename, 'w') do |post|
+ post.puts "---"
+ post.puts "layout: post"
+ post.puts "title: \"#{title.gsub(/-/,' ')}\""
+ post.puts "category: "
+ post.puts "tags: []"
+ post.puts "---"
+ post.puts "{% include JB/setup %}"
+ end
+end # task :post
+
+# Usage: rake page name="about.html"
+# You can also specify a sub-directory path.
+# If you don't specify a file extention we create an index.html at the path specified
+desc "Create a new page."
+task :page do
+ name = ENV["name"] || "new-page.md"
+ filename = File.join(SOURCE, "#{name}")
+ filename = File.join(filename, "index.html") if File.extname(filename) == ""
+ title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase}
+ if File.exist?(filename)
+ abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ end
+
+ mkdir_p File.dirname(filename)
+ puts "Creating new page: #{filename}"
+ open(filename, 'w') do |post|
+ post.puts "---"
+ post.puts "layout: page"
+ post.puts "title: \"#{title}\""
+ post.puts "---"
+ post.puts "{% include JB/setup %}"
+ end
+end # task :page
+
+desc "Launch preview environment"
+task :preview do
+ system "jekyll --auto --server"
+end # task :preview
+
+# Public: Alias - Maintains backwards compatability for theme switching.
+task :switch_theme => "theme:switch"
+
+namespace :theme do
+
+ # Public: Switch from one theme to another for your blog.
+ #
+ # name - String, Required. name of the theme you want to switch to.
+ # The the theme must be installed into your JB framework.
+ #
+ # Examples
+ #
+ # rake theme:switch name="the-program"
+ #
+ # Returns Success/failure messages.
+ desc "Switch between Jekyll-bootstrap themes."
+ task :switch do
+ theme_name = ENV["name"].to_s
+ theme_path = File.join(CONFIG['themes'], theme_name)
+ settings_file = File.join(theme_path, "settings.yml")
+ non_layout_files = ["settings.yml"]
+
+ abort("rake aborted: name cannot be blank") if theme_name.empty?
+ abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
+ abort("rake aborted: '#{CONFIG['layouts']}' directory not found.") unless FileTest.directory?(CONFIG['layouts'])
+
+ Dir.glob("#{theme_path}/*") do |filename|
+ next if non_layout_files.include?(File.basename(filename).downcase)
+ puts "Generating '#{theme_name}' layout: #{File.basename(filename)}"
+
+ open(File.join(CONFIG['layouts'], File.basename(filename)), 'w') do |page|
+ if File.basename(filename, ".html").downcase == "default"
+ page.puts "---"
+ page.puts File.read(settings_file) if File.exist?(settings_file)
+ page.puts "---"
+ else
+ page.puts "---"
+ page.puts "layout: default"
+ page.puts "---"
+ end
+ page.puts "{% include JB/setup %}"
+ page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
+ end
+ end
+
+ puts "=> Theme successfully switched!"
+ puts "=> Reload your web-page to check it out =)"
+ end # task :switch
+
+ # Public: Install a theme using the theme packager.
+ # Version 0.1.0 simple 1:1 file matching.
+ #
+ # git - String, Optional path to the git repository of the theme to be installed.
+ # name - String, Optional name of the theme you want to install.
+ # Passing name requires that the theme package already exist.
+ #
+ # Examples
+ #
+ # rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git"
+ # rake theme:install name="cool-theme"
+ #
+ # Returns Success/failure messages.
+ desc "Install theme"
+ task :install do
+ if ENV["git"]
+ manifest = theme_from_git_url(ENV["git"])
+ name = manifest["name"]
+ else
+ name = ENV["name"].to_s.downcase
+ end
+
+ packaged_theme_path = JB::Path.build(:theme_packages, :node => name)
+
+ abort("rake aborted!
+ => ERROR: 'name' cannot be blank") if name.empty?
+ abort("rake aborted!
+ => ERROR: '#{packaged_theme_path}' directory not found.
+ => Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap
+ => To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'`
+ => example : rake theme:install git='git@github.com:jekyllbootstrap/theme-the-program.git'
+ ") unless FileTest.directory?(packaged_theme_path)
+
+ manifest = verify_manifest(packaged_theme_path)
+
+ # Get relative paths to packaged theme files
+ # Exclude directories as they'll be recursively created. Exclude meta-data files.
+ packaged_theme_files = []
+ FileUtils.cd(packaged_theme_path) {
+ Dir.glob("**/*.*") { |f|
+ next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i )
+ packaged_theme_files << f
+ }
+ }
+
+ # Mirror each file into the framework making sure to prompt if already exists.
+ packaged_theme_files.each do |filename|
+ file_install_path = File.join(JB::Path.base, filename)
+ if File.exist? file_install_path
+ next if ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ else
+ mkdir_p File.dirname(file_install_path)
+ cp_r File.join(packaged_theme_path, filename), file_install_path
+ end
+ end
+
+ puts "=> #{name} theme has been installed!"
+ puts "=> ---"
+ if ask("=> Want to switch themes now?", ['y', 'n']) == 'y'
+ system("rake switch_theme name='#{name}'")
+ end
+ end
+
+ # Public: Package a theme using the theme packager.
+ # The theme must be structured using valid JB API.
+ # In other words packaging is essentially the reverse of installing.
+ #
+ # name - String, Required name of the theme you want to package.
+ #
+ # Examples
+ #
+ # rake theme:package name="twitter"
+ #
+ # Returns Success/failure messages.
+ desc "Package theme"
+ task :package do
+ name = ENV["name"].to_s.downcase
+ theme_path = JB::Path.build(:themes, :node => name)
+ asset_path = JB::Path.build(:theme_assets, :node => name)
+
+ abort("rake aborted: name cannot be blank") if name.empty?
+ abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
+ abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path)
+
+ ## Mirror theme's template directory (_includes)
+ packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name))
+ mkdir_p packaged_theme_path
+ cp_r theme_path, packaged_theme_path
+
+ ## Mirror theme's asset directory
+ packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name))
+ mkdir_p packaged_theme_assets_path
+ cp_r asset_path, packaged_theme_assets_path
+
+ ## Log packager version
+ packager = {"packager" => {"version" => CONFIG["theme_package_version"].to_s } }
+ open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page|
+ page.puts packager.to_yaml
+ end
+
+ puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}"
+ end
+
+end # end namespace :theme
+
+# Internal: Download and process a theme from a git url.
+# Notice we don't know the name of the theme until we look it up in the manifest.
+# So we'll have to change the folder name once we get the name.
+#
+# url - String, Required url to git repository.
+#
+# Returns theme manifest hash
+def theme_from_git_url(url)
+ tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
+ system("git clone #{url} #{tmp_path}")
+ manifest = verify_manifest(tmp_path)
+ new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
+ if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
+ remove_dir(tmp_path)
+ abort("rake aborted: '#{manifest["name"]}' already exists as theme package.")
+ end
+
+ remove_dir(new_path) if File.exist?(new_path)
+ mv(tmp_path, new_path)
+ manifest
+end
+
+# Internal: Process theme package manifest file.
+#
+# theme_path - String, Required. File path to theme package.
+#
+# Returns theme manifest hash
+def verify_manifest(theme_path)
+ manifest = File.join(theme_path, "manifest.yml")
+ abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest
+ manifest = YAML.load_file(manifest)
+ manifest
+end
+
+def ask(message, valid_options)
+ if valid_options
+ answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
+ else
+ answer = get_stdin(message)
+ end
+ answer
+end
+
+def get_stdin(message)
+ print message
+ STDIN.gets.chomp
+end
Oops, something went wrong.

0 comments on commit 99b82e1

Please sign in to comment.