Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

August branch #284

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
_site/*
<<<<<<< HEAD
_theme_packages/*
=======
>>>>>>> origin/docs-theme-packages

Thumbs.db
.DS_Store

!.gitkeep
<<<<<<< HEAD

.rbenv-version
.rvmrc
=======
>>>>>>> origin/docs-theme-packages
6 changes: 6 additions & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<<<<<<< HEAD
jenningsconsulting.co.uk

=======
jekyllbootstrap.com
>>>>>>> origin/docs-theme-packages
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Jekyll-Bootstrap

<<<<<<< HEAD
The quickest way to start and publish your Jekyll powered blog. 100% compatible with GitHub pages

## Usage
Expand Down Expand Up @@ -38,3 +39,17 @@ The documentation website at <http://jekyllbootstrap.com> is maintained at https
## License

[MIT](http://opensource.org/licenses/MIT)
=======
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/)
>>>>>>> origin/docs-theme-packages
69 changes: 69 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "rubygems"
require 'rake'
<<<<<<< HEAD
require 'yaml'
require 'time'

Expand Down Expand Up @@ -41,10 +42,24 @@ module JB
end #JB

# Usage: rake post title="A Title" [date="2012-02-09"] [tags=[tag1,tag2]] [category="category"]
=======

SOURCE = "."
CONFIG = {
'version' => "0.1.0",
'themes' => File.join(SOURCE, "_includes", "themes"),
'layouts' => File.join(SOURCE, "_layouts"),
'posts' => File.join(SOURCE, "_posts"),
'post_ext' => "md"
}

# Usage: rake post title="A Title"
>>>>>>> origin/docs-theme-packages
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"
<<<<<<< HEAD
tags = ENV["tags"] || "[]"
category = ENV["category"] || ""
category = "\"#{category.gsub(/-/,' ')}\"" if !category.empty?
Expand All @@ -56,6 +71,10 @@ task :post do
exit -1
end
filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}")
=======
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
filename = File.join(CONFIG['posts'], "#{Time.now.strftime('%Y-%m-%d')}-#{slug}.#{CONFIG['post_ext']}")
>>>>>>> origin/docs-theme-packages
if File.exist?(filename)
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
end
Expand All @@ -65,9 +84,14 @@ task :post do
post.puts "---"
post.puts "layout: post"
post.puts "title: \"#{title.gsub(/-/,' ')}\""
<<<<<<< HEAD
post.puts 'description: ""'
post.puts "category: #{category}"
post.puts "tags: #{tags}"
=======
post.puts "category: "
post.puts "tags: []"
>>>>>>> origin/docs-theme-packages
post.puts "---"
post.puts "{% include JB/setup %}"
end
Expand All @@ -92,12 +116,16 @@ task :page do
post.puts "---"
post.puts "layout: page"
post.puts "title: \"#{title}\""
<<<<<<< HEAD
post.puts 'description: ""'
=======
>>>>>>> origin/docs-theme-packages
post.puts "---"
post.puts "{% include JB/setup %}"
end
end # task :page

<<<<<<< HEAD
desc "Launch preview environment"
task :preview do
system "jekyll serve -w"
Expand Down Expand Up @@ -292,6 +320,43 @@ def verify_manifest(theme_path)
manifest_file.close
manifest
end
=======
desc "Switch between Jekyll-bootstrap themes."
task :switch_theme 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
end # task :switch_theme

desc "Launch preview environment"
task :preview do
system "jekyll --auto --server"
end # task :preview
>>>>>>> origin/docs-theme-packages

def ask(message, valid_options)
if valid_options
Expand All @@ -305,7 +370,11 @@ end
def get_stdin(message)
print message
STDIN.gets.chomp
<<<<<<< HEAD
end

#Load custom rake scripts
Dir['_rake/*.rake'].each { |r| load r }
=======
end
>>>>>>> origin/docs-theme-packages
130 changes: 0 additions & 130 deletions _config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions _includes/JB/analytics
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
{% include JB/analytics-providers/google %}
{% when "getclicky" %}
{% include JB/analytics-providers/getclicky %}
<<<<<<< HEAD
{% when "mixpanel" %}
{% include JB/analytics-providers/mixpanel %}
{% when "piwik" %}
{% include JB/analytics-providers/piwik %}
=======
>>>>>>> origin/docs-theme-packages
{% when "custom" %}
{% include custom/analytics %}
{% endcase %}
Expand Down
4 changes: 4 additions & 0 deletions _includes/JB/analytics-providers/getclicky
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
})();
</script>
<<<<<<< HEAD
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/{{ site.JB.analytics.getclicky.site_id }}ns.gif" /></p></noscript>
=======
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/66527741ns.gif" /></p></noscript>
>>>>>>> origin/docs-theme-packages
4 changes: 4 additions & 0 deletions _includes/JB/comments
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< HEAD
{% if site.JB.comments.provider and page.comments != false %}
=======
{% if site.JB.comments.provider and page.JB.comments != false %}
>>>>>>> origin/docs-theme-packages

{% case site.JB.comments.provider %}
{% when "disqus" %}
Expand Down
3 changes: 3 additions & 0 deletions _includes/JB/comments-providers/disqus
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<script type="text/javascript">
{% if site.safe == false %}var disqus_developer = 1;{% endif %}
var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname
<<<<<<< HEAD
{% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %}
=======
>>>>>>> origin/docs-theme-packages
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
Expand Down
6 changes: 5 additions & 1 deletion _includes/JB/comments-providers/facebook
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
Expand All @@ -6,4 +7,7 @@
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId={{ site.JB.comments.facebook.appid }}";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="{{ site.production_url }}" data-num-posts="{{ site.JB.comments.facebook.num_posts }}" data-width="{{ site.JB.comments.facebook.width }}" data-colorscheme="{{ site.JB.comments.facebook.colorscheme }}"></div>
<div class="fb-comments" data-href="{{ site.production_url }}" data-num-posts="{{ site.JB.comments.facebook.num_posts }}" data-width="{{ site.JB.comments.facebook.width }}" data-colorscheme="{{ site.JB.comments.facebook.colorscheme }}"></div>
=======
<h3>Facebook comments TODO!</h3>
>>>>>>> origin/docs-theme-packages
4 changes: 4 additions & 0 deletions _includes/JB/liquid_raw
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ Using one will break the other if you plan to deploy to GitHub pages.
see: https://github.com/mojombo/jekyll/issues/425

Since I don't want to mess with Liquid versions, I'll just rewrite the way I
<<<<<<< HEAD
intend to give liquid examples. It's not an elegant solution by any means:
=======
intend to give liquid examples. It's not an elegant by any means:
>>>>>>> origin/docs-theme-packages

Usage:
1) Define a 'text' variable with the block of liquid code you intend to display.
Expand Down
Loading