#NEWLINE# def __init__( self , site_config , base_path ) : #NEWLINE# #INDENT# '\n        :site_config: site global configuration parsed from _config.yml\n        :base_path: root path of wiki directory\n        ' #NEWLINE# self . site_config = copy . deepcopy ( site_config ) #NEWLINE# self . base_path = base_path #NEWLINE# self . _templates = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _template_vars = self . _get_template_vars ( ) #NEWLINE# _template_path = os . path . join ( self . base_path , site_config [ 'themes_dir' ] , site_config [ 'theme' ] ) #NEWLINE# if ( not os . path . exists ( base_path ) ) : #NEWLINE# #INDENT# raise Exception ( "Theme `{0}' not exists" . format ( _template_path ) ) #NEWLINE# #UNINDENT# self . env = Environment ( loader = FileSystemLoader ( _template_path ) ) #NEWLINE# self . _jinja_load_exts ( )