Top Level Namespace
Defined Under Namespace
Modules: Jekyll
Instance Method Summary collapse
-
#announce(string) ⇒ Object
Print a debug message in a fancy way.
- #create_cache(content, cached_file) ⇒ Object
- #create_cache_and_compile(content, cached_file) ⇒ Object
-
#jp(string) ⇒ Object
Print a debug message.
Instance Method Details
#announce(string) ⇒ Object
Print a debug message in a fancy way
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jekyll-pug/pug-renderer.rb', line 19 def announce(string) if $jekyllConfig['jekyll-pug'] if $jekyllConfig['jekyll-pug']['debug'] puts "" puts "############################" puts "# " + string.to_s puts "############################" end end end |
#create_cache(content, cached_file) ⇒ Object
39 40 41 |
# File 'lib/jekyll-pug/pug-renderer.rb', line 39 def create_cache(content, cached_file) ::File.write(cached_file, content) end |
#create_cache_and_compile(content, cached_file) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/jekyll-pug/pug-renderer.rb', line 30 def create_cache_and_compile(content, cached_file) pug_raw = content jp("Compiling.....") content = Pug.compile(content, {"filename"=>$PUG_INCLUDES}) ::File.write(cached_file, pug_raw) ::File.write(cached_file+".html", content) return content end |
#jp(string) ⇒ Object
Print a debug message
10 11 12 13 14 15 16 |
# File 'lib/jekyll-pug/pug-renderer.rb', line 10 def jp(string) if $jekyllConfig['jekyll-pug'] if $jekyllConfig['jekyll-pug']['debug'] puts "[Jekyll-Pug] " + $jekyll_pug_curFile.to_s + " " + string.to_s end end end |