module Templates

Extended Modules

Defined in:

template.cr

Class Method Summary

Class Method Detail

def self.ensure_shortcodes #

Ensure all baked-in shortcodes exist in the shortcodes/ directory If any are missing, extract them from the baked filesystem


[View source]
def self.ensure_theme #

Ensure all baked-in theme files exist in the themes/default/ directory If any are missing, extract them from the baked filesystem


[View source]
def self.environment #

Get the thread/fiber-local Crinja environment


[View source]
def self.find_includes_recursive(node : Crinja::AST::NodeList, current_template : String) : Array(String) #

Recursively traverse the AST to find all {% include %} tags current_template is used to skip self-references (templates that include themselves)


[View source]
def self.get_deps(template) #

[View source]
def self.load_templates : Int32 #

Load templates from theme directory and put them in the k/v store


[View source]