summaryrefslogtreecommitdiff
path: root/_plugins/sidebar.rb
diff options
context:
space:
mode:
authorAndy Konwinski <andrew@apache.org>2013-08-23 17:17:53 +0000
committerAndy Konwinski <andrew@apache.org>2013-08-23 17:17:53 +0000
commit81d6089b47ec4d3e7fe17074f3b5fadec8070071 (patch)
tree1401e9f4bc6e1b9f4596ebecc5b7332d9ed96f3a /_plugins/sidebar.rb
parent71bac61ea11df8144a9a3d2be75ef996517b136d (diff)
downloadspark-website-81d6089b47ec4d3e7fe17074f3b5fadec8070071.tar.gz
spark-website-81d6089b47ec4d3e7fe17074f3b5fadec8070071.tar.bz2
spark-website-81d6089b47ec4d3e7fe17074f3b5fadec8070071.zip
Initial port of Spark website from spark-project.org wordpress to Jekyll.
Diffstat (limited to '_plugins/sidebar.rb')
-rw-r--r--_plugins/sidebar.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/_plugins/sidebar.rb b/_plugins/sidebar.rb
new file mode 100644
index 000000000..9f652cb2d
--- /dev/null
+++ b/_plugins/sidebar.rb
@@ -0,0 +1,16 @@
+module Liquid
+ class SidebarBlock < Liquid::Block
+ alias :super_render :render
+
+ def initialize(tag_name, identifier, tokens)
+ super
+ end
+
+ def render(context)
+ context.environments.first["page"]["sidebar"] = super_render(context)
+ ''
+ end
+ end
+end
+puts "registering new sidebar template"
+Liquid::Template.register_tag('sidebar', Liquid::SidebarBlock) \ No newline at end of file