class Object

Public Instance Methods

announce(string) click to toggle source
# File lib/jekyll-pug/pug-renderer.rb, line 17
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) click to toggle source
# File lib/jekyll-pug/pug-renderer.rb, line 37
def create_cache(content, cached_file)
    ::File.write(cached_file, content)
end
create_cache_and_compile(content, cached_file) click to toggle source
# File lib/jekyll-pug/pug-renderer.rb, line 28
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) click to toggle source
# File lib/jekyll-pug/pug-renderer.rb, line 9
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