Class: JekyllSupport::OutlineJsTag
Constant Summary
JekyllOutlineVersion::VERSION
Instance Method Summary
collapse
Instance Method Details
#render_impl ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/outline_js.rb', line 10
def render_impl
wrap_in_script_tag = @helper.parameter_specified?('wrap_in_script_tag')
gem_path = Gem::Specification.find_by_name('jekyll_outline').full_gem_path
js_path = File.join(gem_path, 'demo/assets/js/jekyll_outline.js')
js = File.read(js_path)
if wrap_in_script_tag
" <script>\n \#{indent(js)}\n </script>\n END_JS\n else\n js\n end\nend\n"
|