Skip to content

Commit a1a7efa

Browse files
committed
Include 'JB/setup' in all posts and pages
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
1 parent 7ef7288 commit a1a7efa

10 files changed

+11
-4
lines changed

Rakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ task :new_post, :title do |t, args|
2929
post.puts "category: "
3030
post.puts "tags: []"
3131
post.puts "---"
32+
page.puts "{% include JB/setup %}"
3233
end
3334
end # task :new_post
3435

@@ -55,7 +56,7 @@ task :switch_theme, :theme do |t, args|
5556
page.puts "layout: default"
5657
page.puts "---"
5758
end
58-
page.puts "{% include JB/set_paths %}"
59+
page.puts "{% include JB/setup %}"
5960
page.puts "{% include themes/#{args.theme}/#{File.basename(filename)} %}"
6061
end
6162
end

_layouts/default.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
theme :
33
name : twitter
44
---
5-
{% include JB/set_paths %}
5+
{% include JB/setup %}
66
{% include themes/twitter/default.html %}

_layouts/page.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
layout: default
33
---
4-
{% include JB/set_paths %}
4+
{% include JB/setup %}
55
{% include themes/twitter/page.html %}

_layouts/post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
layout: default
33
---
4-
{% include JB/set_paths %}
4+
{% include JB/setup %}
55
{% include themes/twitter/post.html %}

_posts/core-samples/2011-12-29-jekyll-introduction.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ layout: post
33
category : lessons
44
tags : [intro, beginner, jekyll, tutorial]
55
---
6+
{% include JB/setup %}
67

78
This Jekyll introduction will outline specifically what Jekyll is and why you would want to use it.
89
Directly following the intro we'll learn exactly _how_ Jekyll does what it does.

archive.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
header : Post Archive
55
group: navigation
66
---
7+
{% include JB/setup %}
78

89
{% assign posts_collate = site.posts %}
910
{% include helpers/posts_collate.html %}

categories.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
header: Posts By Category
55
group: navigation
66
---
7+
{% include JB/setup %}
78

89
<ul class="tag_box inline">
910
{% assign categories_list = site.categories %}

index.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: page
33
title: Hello World!
44
---
5+
{% include JB/setup %}
56

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

pages.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
header: Pages
55
group: navigation
66
---
7+
{% include JB/setup %}
78

89
<h2>All Pages</h2>
910
<ul>

tags.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
header: Posts By Tag
55
group: navigation
66
---
7+
{% include JB/setup %}
78

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

0 commit comments

Comments
 (0)