Skip to content

Commit

Permalink
Fix for issue #113, based heavily on fujii@16e8a9d10259e4665534825422…
Browse files Browse the repository at this point in the history
…ec05b704f7114d.
  • Loading branch information
groundh0g committed Feb 28, 2015
1 parent c77431d commit 13547e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,10 @@ namespace :theme do
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 "---"
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
Expand Down
2 changes: 2 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
theme :
name : bootstrap-3
layout: default
---
{% include JB/setup %}
Expand Down
2 changes: 2 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
theme :
name : bootstrap-3
layout: default
---
{% include JB/setup %}
Expand Down

0 comments on commit 13547e6

Please sign in to comment.