From 6aa449bd03e48cf069500bd36ca4bab4e4280c38 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Tue, 16 Jun 2015 10:54:48 +0200 Subject: [PATCH] initial commit with jekyll-boostrap --- .gitignore | 10 + 404.html | 1 + History.markdown | 16 + README.md | 78 ++ Rakefile | 306 +++++++ _config.yml | 134 +++ _drafts/jekyll-introduction-draft.md | 10 + _includes/JB/analytics | 20 + _includes/JB/analytics-providers/gauges | 13 + _includes/JB/analytics-providers/getclicky | 12 + _includes/JB/analytics-providers/google | 11 + .../JB/analytics-providers/google-universal | 9 + _includes/JB/analytics-providers/mixpanel | 11 + _includes/JB/analytics-providers/piwik | 10 + _includes/JB/categories_list | 37 + _includes/JB/comments | 18 + _includes/JB/comments-providers/disqus | 15 + _includes/JB/comments-providers/duoshuo | 14 + _includes/JB/comments-providers/facebook | 9 + _includes/JB/comments-providers/intensedebate | 6 + _includes/JB/comments-providers/livefyre | 6 + _includes/JB/feedburner | 3 + _includes/JB/file_exists | 26 + _includes/JB/gist | 19 + _includes/JB/is_production | 39 + _includes/JB/liquid_raw | 32 + _includes/JB/pages_list | 39 + _includes/JB/posts_collate | 55 ++ _includes/JB/setup | 23 + _includes/JB/sharing | 9 + _includes/JB/sort_collection | 81 ++ _includes/JB/tags_list | 33 + _includes/themes/bootstrap-3/default.html | 98 +++ _includes/themes/bootstrap-3/page.html | 9 + _includes/themes/bootstrap-3/post.html | 47 ++ _includes/themes/bootstrap-3/settings.yml | 2 + _includes/themes/twitter/default.html | 66 ++ _includes/themes/twitter/page.html | 9 + _includes/themes/twitter/post.html | 49 ++ _includes/themes/twitter/settings.yml | 2 + _layouts/default.html | 6 + _layouts/page.html | 7 + _layouts/post.html | 7 + _plugins/debug.rb | 38 + .../2011-12-29-jekyll-introduction.md | 412 +++++++++ archive.html | 10 + .../bootstrap/css/bootstrap-theme.min.css | 7 + .../bootstrap/css/bootstrap.min.css | 7 + .../bootstrap/css/bs-sticky-footer.css | 29 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20290 bytes .../fonts/glyphicons-halflings-regular.svg | 229 +++++ .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41236 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23292 bytes .../bootstrap-3/bootstrap/js/bootstrap.min.js | 7 + assets/themes/bootstrap-3/css/style.css | 79 ++ .../bootstrap/css/bootstrap.2.2.2.min.css | 782 ++++++++++++++++++ .../img/glyphicons-halflings-white.png | Bin 0 -> 8777 bytes .../bootstrap/img/glyphicons-halflings.png | Bin 0 -> 12799 bytes assets/themes/twitter/css/style.css | 65 ++ atom.xml | 28 + categories.html | 22 + changelog.md | 70 ++ index.md | 46 ++ pages.html | 13 + rss.xml | 28 + sitemap.txt | 8 + tags.html | 21 + 67 files changed, 3308 insertions(+) create mode 100644 .gitignore create mode 100644 404.html create mode 100644 History.markdown create mode 100644 README.md create mode 100644 Rakefile create mode 100644 _config.yml create mode 100644 _drafts/jekyll-introduction-draft.md create mode 100644 _includes/JB/analytics create mode 100644 _includes/JB/analytics-providers/gauges create mode 100644 _includes/JB/analytics-providers/getclicky create mode 100644 _includes/JB/analytics-providers/google create mode 100644 _includes/JB/analytics-providers/google-universal create mode 100644 _includes/JB/analytics-providers/mixpanel create mode 100755 _includes/JB/analytics-providers/piwik create mode 100644 _includes/JB/categories_list create mode 100644 _includes/JB/comments create mode 100644 _includes/JB/comments-providers/disqus create mode 100644 _includes/JB/comments-providers/duoshuo create mode 100644 _includes/JB/comments-providers/facebook create mode 100644 _includes/JB/comments-providers/intensedebate create mode 100644 _includes/JB/comments-providers/livefyre create mode 100644 _includes/JB/feedburner create mode 100644 _includes/JB/file_exists create mode 100644 _includes/JB/gist create mode 100644 _includes/JB/is_production create mode 100644 _includes/JB/liquid_raw create mode 100644 _includes/JB/pages_list create mode 100644 _includes/JB/posts_collate create mode 100644 _includes/JB/setup create mode 100644 _includes/JB/sharing create mode 100644 _includes/JB/sort_collection create mode 100644 _includes/JB/tags_list create mode 100644 _includes/themes/bootstrap-3/default.html create mode 100644 _includes/themes/bootstrap-3/page.html create mode 100644 _includes/themes/bootstrap-3/post.html create mode 100644 _includes/themes/bootstrap-3/settings.yml create mode 100644 _includes/themes/twitter/default.html create mode 100644 _includes/themes/twitter/page.html create mode 100644 _includes/themes/twitter/post.html create mode 100644 _includes/themes/twitter/settings.yml create mode 100644 _layouts/default.html create mode 100644 _layouts/page.html create mode 100644 _layouts/post.html create mode 100644 _plugins/debug.rb create mode 100644 _posts/core-samples/2011-12-29-jekyll-introduction.md create mode 100644 archive.html create mode 100644 assets/themes/bootstrap-3/bootstrap/css/bootstrap-theme.min.css create mode 100644 assets/themes/bootstrap-3/bootstrap/css/bootstrap.min.css create mode 100644 assets/themes/bootstrap-3/bootstrap/css/bs-sticky-footer.css create mode 100644 assets/themes/bootstrap-3/bootstrap/fonts/glyphicons-halflings-regular.eot create mode 100644 assets/themes/bootstrap-3/bootstrap/fonts/glyphicons-halflings-regular.svg create mode 100644 assets/themes/bootstrap-3/bootstrap/fonts/glyphicons-halflings-regular.ttf create mode 100644 assets/themes/bootstrap-3/bootstrap/fonts/glyphicons-halflings-regular.woff create mode 100644 assets/themes/bootstrap-3/bootstrap/js/bootstrap.min.js create mode 100644 assets/themes/bootstrap-3/css/style.css create mode 100644 assets/themes/twitter/bootstrap/css/bootstrap.2.2.2.min.css create mode 100644 assets/themes/twitter/bootstrap/img/glyphicons-halflings-white.png create mode 100644 assets/themes/twitter/bootstrap/img/glyphicons-halflings.png create mode 100644 assets/themes/twitter/css/style.css create mode 100755 atom.xml create mode 100644 categories.html create mode 100644 changelog.md create mode 100644 index.md create mode 100644 pages.html create mode 100755 rss.xml create mode 100644 sitemap.txt create mode 100644 tags.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..d0174fbb --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +_site/* +_theme_packages/* + +Thumbs.db +.DS_Store + +!.gitkeep + +.rbenv-version +.rvmrc diff --git a/404.html b/404.html new file mode 100644 index 00000000..6904bcdd --- /dev/null +++ b/404.html @@ -0,0 +1 @@ +Sorry this page does not exist =( diff --git a/History.markdown b/History.markdown new file mode 100644 index 00000000..5ef89c16 --- /dev/null +++ b/History.markdown @@ -0,0 +1,16 @@ +## HEAD + +### Major Enhancements + +### Minor Enahncements + * Add `drafts` folder support (#167) + * Add `excerpt` support (#168) + * Create History.markdown to help project management (#169) + +### Bug Fixes + +### Site Enhancements + +### Compatibility updates + * Update `preview` task + diff --git a/README.md b/README.md new file mode 100644 index 00000000..62fcfcad --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# Jekyll-Bootstrap + +The quickest way to start and publish your Jekyll powered blog. 100% compatible with GitHub pages + +## Usage + +For all usage and documentation please see: + +## Version + +0.3.0 - stable and versioned using [semantic versioning](http://semver.org/). + +**NOTE:** 0.3.0 introduces a new theme which is not backwards compatible in the sense it won't _look_ like the old version. +However, the actual API has not changed at all. +You might want to run 0.3.0 in a branch to make sure you are ok with the theme design changes. + +## Milestones + +[0.4.0](https://github.com/plusjade/jekyll-bootstrap/milestones/v%200.4.0) - next release [ETA 03/29/2015] + +### GOALS + +* No open PRs against master branch. +* Squash some bugs. +* Add some new features (low-hanging fruit). +* Establish social media presence. + + +### Bugs + +|Bug |Description +|------|--------------- +|[#86](https://github.com/plusjade/jekyll-bootstrap/issues/86) |☑ Facebook Comments +|[#113](https://github.com/plusjade/jekyll-bootstrap/issues/113)|☑ ASSET_PATH w/ page & post +|[#144](https://github.com/plusjade/jekyll-bootstrap/issues/144)|☐ BASE_PATH w/ FQDN +|[#227](https://github.com/plusjade/jekyll-bootstrap/issues/227)|☑ Redundant JB/setup + +### Features + +|Bug |Description +|------|--------------- +|[#98](https://github.com/plusjade/jekyll-bootstrap/issues/98) |☑ GIST Integration +|[#244](https://github.com/plusjade/jekyll-bootstrap/issues/244)|☑ JB/file_exists Helper +|[#42](https://github.com/plusjade/jekyll-bootstrap/issues/42) |☑ Sort collections of Pages / Posts +|[#84](https://github.com/plusjade/jekyll-bootstrap/issues/84) |☐ Detecting production mode + +### TODOS + +Review existing pull requests against plusjake/jekyll-bootstrap:master. Merge or close each. + +* Create twitter account. Add link / icon on jekyllbootstrap.com. +* Create blog posts under plusjade/gh-pages, expose on jekyllbootstrap.com, feed to twitter account. +* Announce state of project, announce roadmap(s), announce new versions as they’re released. + +## Contributing + + +To contribute to the framework please make sure to checkout your branch based on `jb-development`!! +This is very important as it allows me to accept your pull request without having to publish a public version release. + +Small, atomic Features, bugs, etc. +Use the `jb-development` branch but note it will likely change fast as pull requests are accepted. +Please rebase as often as possible when working. +Work on small, atomic features/bugs to avoid upstream commits affecting/breaking your development work. + +For Big Features or major API extensions/edits: +This is the one case where I'll accept pull-requests based off the master branch. +This allows you to work in isolation but it means I'll have to manually merge your work into the next public release. +Translation : it might take a bit longer so please be patient! (but sincerely thank you). + +**Jekyll-Bootstrap Documentation Website.** + +The documentation website at is maintained at https://github.com/plusjade/jekyllbootstrap.com + + +## License + +[MIT](http://opensource.org/licenses/MIT) diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..183ca1ee --- /dev/null +++ b/Rakefile @@ -0,0 +1,306 @@ +require "rubygems" +require 'rake' +require 'yaml' +require 'time' + +SOURCE = "." +CONFIG = { + 'version' => "0.3.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" [date="2012-02-09"] [tags=[tag1,tag2]] [category="category"] +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" + tags = ENV["tags"] || "[]" + category = ENV["category"] || "" + category = "\"#{category.gsub(/-/,' ')}\"" if !category.empty? + slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') + begin + date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d') + rescue => e + puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!" + exit -1 + end + filename = File.join(CONFIG['posts'], "#{date}-#{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 'description: ""' + post.puts "category: #{category}" + post.puts "tags: #{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 'description: ""' + post.puts "---" + post.puts "{% include JB/setup %}" + end +end # task :page + +desc "Launch preview environment" +task :preview do + system "jekyll serve -w" +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 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| + page.puts "---" + page.puts File.read(settings_file) if File.exist?(settings_file) + page.puts "layout: default" unless File.basename(filename, ".html").downcase == "default" + page.puts "---" + 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 and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' + next + 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") + abort("rake aborted: system call to git clone failed") if !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_path = File.join(theme_path, "manifest.yml") + manifest_file = File.open( manifest_path ) + abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file + manifest = YAML.load( manifest_file ) + manifest_file.close + 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 + +#Load custom rake scripts +Dir['_rake/*.rake'].each { |r| load r } diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..c6deca5b --- /dev/null +++ b/_config.yml @@ -0,0 +1,134 @@ +# This is the default format. +# For more see: http://jekyllrb.com/docs/permalinks/ +permalink: /:categories/:year/:month/:day/:title + +exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"] +highlighter: pygments + +# Themes are encouraged to use these universal variables +# so be sure to set them if your theme uses them. +# +title : Jekyll Bootstrap +tagline: Site Tagline +author : + name : Name Lastname + email : blah@email.test + github : username + twitter : username + feedburner : feedname + +# The production_url is only used when full-domain names are needed +# such as sitemap.txt +# Most places will/should use BASE_PATH to make the urls +# +# If you have set a CNAME (pages.github.com) set your custom domain here. +# Else if you are pushing to username.github.io, replace with your username. +# Finally if you are pushing to a GitHub project page, include the project name at the end. +# +production_url : http://username.github.io + +# All Jekyll-Bootstrap specific configurations are namespaced into this hash +# +JB : + version : 0.3.0 + + # All links will be namespaced by BASE_PATH if defined. + # Links in your website should always be prefixed with {{BASE_PATH}} + # however this value will be dynamically changed depending on your deployment situation. + # + # CNAME (http://yourcustomdomain.com) + # DO NOT SET BASE_PATH + # (urls will be prefixed with "/" and work relatively) + # + # GitHub Pages (http://username.github.io) + # DO NOT SET BASE_PATH + # (urls will be prefixed with "/" and work relatively) + # + # GitHub Project Pages (http://username.github.io/project-name) + # + # A GitHub Project site exists in the `gh-pages` branch of one of your repositories. + # REQUIRED! Set BASE_PATH to: http://username.github.io/project-name + # + # CAUTION: + # - When in Localhost, your site will run from root "/" regardless of BASE_PATH + # - Only the following values are falsy: ["", null, false] + # - When setting BASE_PATH it must be a valid url. + # This means always setting the protocol (http|https) or prefixing with "/" + BASE_PATH : false + + # By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme. + # ex: [BASE_PATH]/assets/themes/[THEME-NAME] + # + # Override this by defining an absolute path to assets here. + # ex: + # http://s3.amazonaws.com/yoursite/themes/watermelon + # /assets + # + ASSET_PATH : false + + # These paths are to the main pages Jekyll-Bootstrap ships with. + # Some JB helpers refer to these paths; change them here if needed. + # + archive_path: /archive.html + categories_path : /categories.html + tags_path : /tags.html + atom_path : /atom.xml + rss_path : /rss.xml + + # Settings for comments helper + # Set 'provider' to the comment provider you want to use. + # Set 'provider' to false to turn commenting off globally. + # + comments : + provider : disqus + disqus : + short_name : jekyllbootstrap + livefyre : + site_id : 123 + intensedebate : + account : 123abc + facebook : + appid : 123 + num_posts: 5 + width: 580 + colorscheme: light + duoshuo : + short_name : jekyllbootstrap + + # Settings for analytics helper + # Set 'provider' to the analytics provider you want to use. + # Set 'provider' to false to turn analytics off globally. + # + analytics : + provider : google + gauges : + site_id : 'SITE ID' + google : + tracking_id : 'UA-123-12' + getclicky : + site_id : + mixpanel : + token : '_MIXPANEL_TOKEN_' + piwik : + baseURL : 'myserver.tld/piwik' # Piwik installation address (without protocol) + idsite : '1' # the id of the site on Piwik + + # Settings for sharing helper. + # Sharing is for things like tweet, plusone, like, reddit buttons etc. + # Set 'provider' to the sharing provider you want to use. + # Set 'provider' to false to turn sharing off globally. + # + sharing : + provider : false + + # Settings for all other include helpers can be defined by creating + # a hash with key named for the given helper. ex: + # + # pages_list : + # provider : "custom" + # + # Setting any helper's provider to 'custom' will bypass the helper code + # and include your custom code. Your custom file must be defined at: + # ./_includes/custom/[HELPER] + # where [HELPER] is the name of the helper you are overriding. + diff --git a/_drafts/jekyll-introduction-draft.md b/_drafts/jekyll-introduction-draft.md new file mode 100644 index 00000000..88b93f01 --- /dev/null +++ b/_drafts/jekyll-introduction-draft.md @@ -0,0 +1,10 @@ +--- +layout: post +category : lessons +tagline: "Supporting tagline" +tags : [intro, beginner, jekyll, tutorial] +--- +{% include JB/setup %} + + +This is an example of a draft. Read more here: [http://jekyllrb.com/docs/drafts/](http://jekyllrb.com/docs/drafts/) diff --git a/_includes/JB/analytics b/_includes/JB/analytics new file mode 100644 index 00000000..2bb4c802 --- /dev/null +++ b/_includes/JB/analytics @@ -0,0 +1,20 @@ +{% include JB/is_production %} + +{% if is_production and site.JB.analytics.provider and page.JB.analytics != false %} + +{% case site.JB.analytics.provider %} +{% when "gauges" %} + {% include JB/analytics-providers/gauges %} +{% when "google" %} + {% include JB/analytics-providers/google %} +{% when "getclicky" %} + {% include JB/analytics-providers/getclicky %} +{% when "mixpanel" %} + {% include JB/analytics-providers/mixpanel %} +{% when "piwik" %} + {% include JB/analytics-providers/piwik %} +{% when "custom" %} + {% include custom/analytics %} +{% endcase %} + +{% endif %} diff --git a/_includes/JB/analytics-providers/gauges b/_includes/JB/analytics-providers/gauges new file mode 100644 index 00000000..b793ff10 --- /dev/null +++ b/_includes/JB/analytics-providers/gauges @@ -0,0 +1,13 @@ + diff --git a/_includes/JB/analytics-providers/getclicky b/_includes/JB/analytics-providers/getclicky new file mode 100644 index 00000000..e9462f4f --- /dev/null +++ b/_includes/JB/analytics-providers/getclicky @@ -0,0 +1,12 @@ + + diff --git a/_includes/JB/analytics-providers/google b/_includes/JB/analytics-providers/google new file mode 100644 index 00000000..9014866a --- /dev/null +++ b/_includes/JB/analytics-providers/google @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/_includes/JB/analytics-providers/google-universal b/_includes/JB/analytics-providers/google-universal new file mode 100644 index 00000000..834f2eec --- /dev/null +++ b/_includes/JB/analytics-providers/google-universal @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/_includes/JB/analytics-providers/mixpanel b/_includes/JB/analytics-providers/mixpanel new file mode 100644 index 00000000..4406eb04 --- /dev/null +++ b/_includes/JB/analytics-providers/mixpanel @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/_includes/JB/analytics-providers/piwik b/_includes/JB/analytics-providers/piwik new file mode 100755 index 00000000..077a373a --- /dev/null +++ b/_includes/JB/analytics-providers/piwik @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/_includes/JB/categories_list b/_includes/JB/categories_list new file mode 100644 index 00000000..83be2e29 --- /dev/null +++ b/_includes/JB/categories_list @@ -0,0 +1,37 @@ +{% comment %}{% endcomment %} + +{% if site.JB.categories_list.provider == "custom" %} + {% include custom/categories_list %} +{% else %} + {% if categories_list.first[0] == null %} + {% for category in categories_list %} +
  • + {{ category | join: "/" }} {{ site.categories[category].size }} +
  • + {% endfor %} + {% else %} + {% for category in categories_list %} +
  • + {{ category[0] | join: "/" }} {{ category[1].size }} +
  • + {% endfor %} + {% endif %} +{% endif %} +{% assign categories_list = nil %} \ No newline at end of file diff --git a/_includes/JB/comments b/_includes/JB/comments new file mode 100644 index 00000000..eec2e1e7 --- /dev/null +++ b/_includes/JB/comments @@ -0,0 +1,18 @@ +{% if site.JB.comments.provider and page.comments != false %} + +{% case site.JB.comments.provider %} +{% when "disqus" %} + {% include JB/comments-providers/disqus %} +{% when "livefyre" %} + {% include JB/comments-providers/livefyre %} +{% when "intensedebate" %} + {% include JB/comments-providers/intensedebate %} +{% when "facebook" %} + {% include JB/comments-providers/facebook %} +{% when "duoshuo" %} + {% include JB/comments-providers/duoshuo %} +{% when "custom" %} + {% include custom/comments %} +{% endcase %} + +{% endif %} \ No newline at end of file diff --git a/_includes/JB/comments-providers/disqus b/_includes/JB/comments-providers/disqus new file mode 100644 index 00000000..63431003 --- /dev/null +++ b/_includes/JB/comments-providers/disqus @@ -0,0 +1,15 @@ +
    + + +blog comments powered by Disqus diff --git a/_includes/JB/comments-providers/duoshuo b/_includes/JB/comments-providers/duoshuo new file mode 100644 index 00000000..90865a07 --- /dev/null +++ b/_includes/JB/comments-providers/duoshuo @@ -0,0 +1,14 @@ + +
    + + diff --git a/_includes/JB/comments-providers/facebook b/_includes/JB/comments-providers/facebook new file mode 100644 index 00000000..e1d3debe --- /dev/null +++ b/_includes/JB/comments-providers/facebook @@ -0,0 +1,9 @@ +
    + +
    \ No newline at end of file diff --git a/_includes/JB/comments-providers/intensedebate b/_includes/JB/comments-providers/intensedebate new file mode 100644 index 00000000..233ce341 --- /dev/null +++ b/_includes/JB/comments-providers/intensedebate @@ -0,0 +1,6 @@ + + diff --git a/_includes/JB/comments-providers/livefyre b/_includes/JB/comments-providers/livefyre new file mode 100644 index 00000000..704b8039 --- /dev/null +++ b/_includes/JB/comments-providers/livefyre @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/_includes/JB/feedburner b/_includes/JB/feedburner new file mode 100644 index 00000000..6dba6035 --- /dev/null +++ b/_includes/JB/feedburner @@ -0,0 +1,3 @@ +{% if site.author.feedburner != null %} + +{% endif %} diff --git a/_includes/JB/file_exists b/_includes/JB/file_exists new file mode 100644 index 00000000..f40080f1 --- /dev/null +++ b/_includes/JB/file_exists @@ -0,0 +1,26 @@ +{% comment %}{% endcomment %} + +{% assign file_exists_result = false %} + +{% if include.file %} + {% for static_file in site.static_files %} + {% if static_file.path == include.file %} + {% assign file_exists_result = true %} + {% break %} + {% endif %} + {% endfor %} +{% endif %} diff --git a/_includes/JB/gist b/_includes/JB/gist new file mode 100644 index 00000000..38a5b1ca --- /dev/null +++ b/_includes/JB/gist @@ -0,0 +1,19 @@ +{% comment %}{% endcomment %} + +
    + + +
    diff --git a/_includes/JB/is_production b/_includes/JB/is_production new file mode 100644 index 00000000..3548f8c3 --- /dev/null +++ b/_includes/JB/is_production @@ -0,0 +1,39 @@ +{% capture jbcache %}{% comment %} + + Determine whether or not the site is being built in a production environment. + + Parameters: + None. + + Returns: + is_production: [true|false] + jb_prod_env: [development|github|other] + + Examples: + + {% include JB/is_production %} + + {% if is_production != true %} +

    This is Private

    +

    I love to watch television in my undies. Don't tell anyone!

    + {% endif %} + +

    This is Public

    +

    I have no unusual quirks.

    + +{% endcomment %} + +{% assign is_production = false %} +{% assign jb_prod_env = "development" %} + +{% if jekyll.environment != "development" %} + {% assign is_production = true %} + {% assign jb_prod_env = jekyll.environment %} +{% endif %} + +{% if site.github %} + {% assign is_production = true %} + {% assign jb_prod_env = "github" %} +{% endif %} + +{% endcapture %}{% assign jbcache = nil %} \ No newline at end of file diff --git a/_includes/JB/liquid_raw b/_includes/JB/liquid_raw new file mode 100644 index 00000000..da2d3590 --- /dev/null +++ b/_includes/JB/liquid_raw @@ -0,0 +1,32 @@ +{% comment%}{% endcomment%} + +{% if site.JB.liquid_raw.provider == "custom" %} + {% include custom/liquid_raw %} +{% else %} +
    {{text | replace:"|.", "{" | replace:".|", "}" | replace:">", ">" | replace:"<", "<" }}
    +{% endif %} +{% assign text = nil %} \ No newline at end of file diff --git a/_includes/JB/pages_list b/_includes/JB/pages_list new file mode 100644 index 00000000..42f827a8 --- /dev/null +++ b/_includes/JB/pages_list @@ -0,0 +1,39 @@ +{% comment %}{% endcomment %} + +{% if site.JB.pages_list.provider == "custom" %} + {% include custom/pages_list %} +{% else %} + {% for node in pages_list %} + {% if node.title != null %} + {% if group == null or group == node.group %} + {% if page.url == node.url %} +
  • {{node.title}}
  • + {% else %} +
  • {{node.title}}
  • + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% assign pages_list = nil %} +{% assign group = nil %} \ No newline at end of file diff --git a/_includes/JB/posts_collate b/_includes/JB/posts_collate new file mode 100644 index 00000000..f612ade8 --- /dev/null +++ b/_includes/JB/posts_collate @@ -0,0 +1,55 @@ +{% comment %}{% endcomment %} + +{% if site.JB.posts_collate.provider == "custom" %} + {% include custom/posts_collate %} +{% else %} + {% for post in posts_collate %} + {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} + {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} + {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} + {% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %} + + {% if forloop.first %} +

    {{this_year}}

    +

    {{this_month}}

    +
      + {% endif %} + +
    • {{ post.date | date: "%B %e, %Y" }} » {{ post.title }}
    • + + {% if forloop.last %} +
    + {% else %} + {% if this_year != next_year %} + +

    {{next_year}}

    +

    {{next_month}}

    +
      + {% else %} + {% if this_month != next_month %} +
    +

    {{next_month}}

    +