diff options
author | Patrick Wendell <pwendell@gmail.com> | 2014-03-02 18:19:01 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-03-02 18:19:01 -0800 |
commit | 55a4f11b5064650024bb13c68639665394c03a0c (patch) | |
tree | c69aa5b17e31e711a50820f327a5dbe1c58bb978 /docs/_plugins | |
parent | c3f5e075335a65ea522b2f76716921ec056c52ed (diff) | |
download | spark-55a4f11b5064650024bb13c68639665394c03a0c.tar.gz spark-55a4f11b5064650024bb13c68639665394c03a0c.tar.bz2 spark-55a4f11b5064650024bb13c68639665394c03a0c.zip |
Add Jekyll tag to isolate "production-only" doc components.
Author: Patrick Wendell <pwendell@gmail.com>
Closes #56 from pwendell/jekyll-prod and squashes the following commits:
1bdc3a8 [Patrick Wendell] Add Jekyll tag to isolate "production-only" doc components.
Diffstat (limited to 'docs/_plugins')
-rw-r--r-- | docs/_plugins/production_tag.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/_plugins/production_tag.rb b/docs/_plugins/production_tag.rb new file mode 100644 index 0000000000..9f870cf213 --- /dev/null +++ b/docs/_plugins/production_tag.rb @@ -0,0 +1,14 @@ +module Jekyll + class ProductionTag < Liquid::Block + + def initialize(tag_name, markup, tokens) + super + end + + def render(context) + if ENV['PRODUCTION'] then super else "" end + end + end +end + +Liquid::Template.register_tag('production', Jekyll::ProductionTag) |