Skip to content

Commit

Permalink
Include 'JB/setup' in all posts and pages
Browse files Browse the repository at this point in the history
This is the only way we can have global access to dynamic liquid variables. Using site configuration is too convulated since switching themes and runing in development vs. production relies on being able to dynamically define variables
  • Loading branch information
plusjade committed Jan 23, 2012
1 parent 7ef7288 commit a1a7efa
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ task :new_post, :title do |t, args|
post.puts "category: "
post.puts "tags: []"
post.puts "---"
page.puts "{% include JB/setup %}"
end
end # task :new_post

Expand All @@ -55,7 +56,7 @@ task :switch_theme, :theme do |t, args|
page.puts "layout: default"
page.puts "---"
end
page.puts "{% include JB/set_paths %}"
page.puts "{% include JB/setup %}"
page.puts "{% include themes/#{args.theme}/#{File.basename(filename)} %}"
end
end
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
theme :
name : twitter
---
{% include JB/set_paths %}
{% include JB/setup %}
{% include themes/twitter/default.html %}
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
---
{% include JB/set_paths %}
{% include JB/setup %}
{% include themes/twitter/page.html %}
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
---
{% include JB/set_paths %}
{% include JB/setup %}
{% include themes/twitter/post.html %}
1 change: 1 addition & 0 deletions _posts/core-samples/2011-12-29-jekyll-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: post
category : lessons
tags : [intro, beginner, jekyll, tutorial]
---
{% include JB/setup %}

This Jekyll introduction will outline specifically what Jekyll is and why you would want to use it.
Directly following the intro we'll learn exactly _how_ Jekyll does what it does.
Expand Down
1 change: 1 addition & 0 deletions archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
header : Post Archive
group: navigation
---
{% include JB/setup %}

{% assign posts_collate = site.posts %}
{% include helpers/posts_collate.html %}
1 change: 1 addition & 0 deletions categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
header: Posts By Category
group: navigation
---
{% include JB/setup %}

<ul class="tag_box inline">
{% assign categories_list = site.categories %}
Expand Down
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: page
title: Hello World!
---
{% include JB/setup %}

Read [Jekyll Quick Start](http://jekyllbootstrap.com/usage/jekyll-quick-start.html)

Expand Down
1 change: 1 addition & 0 deletions pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
header: Pages
group: navigation
---
{% include JB/setup %}

<h2>All Pages</h2>
<ul>
Expand Down
1 change: 1 addition & 0 deletions tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
header: Posts By Tag
group: navigation
---
{% include JB/setup %}

<ul class="tag_box inline">
{% assign tags_list = site.tags %}
Expand Down

0 comments on commit a1a7efa

Please sign in to comment.