aboutsummaryrefslogtreecommitdiff
path: root/docs/_plugins
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2014-03-02 18:19:01 -0800
committerPatrick Wendell <pwendell@gmail.com>2014-03-02 18:19:01 -0800
commit55a4f11b5064650024bb13c68639665394c03a0c (patch)
treec69aa5b17e31e711a50820f327a5dbe1c58bb978 /docs/_plugins
parentc3f5e075335a65ea522b2f76716921ec056c52ed (diff)
downloadspark-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.rb14
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)