MCPcopy Index your code
hub / github.com/mkdocs/mkdocs / get_env

Method get_env

mkdocs/theme.py:158–166  ·  view source on GitHub ↗

Return a Jinja environment for the theme.

(self)

Source from the content-addressed store, hash-verified

156 self.__vars.update(theme_config)
157
158 def get_env(self) -> jinja2.Environment:
159 """Return a Jinja environment for the theme."""
160 loader = jinja2.FileSystemLoader(self.dirs)
161 # No autoreload because editing a template in the middle of a build is not useful.
162 env = jinja2.Environment(loader=loader, auto_reload=False)
163 env.filters['url'] = templates.url_filter
164 env.filters['script_tag'] = templates.script_tag_filter
165 localization.install_translations(env, self.locale, self.dirs)
166 return env

Calls

no outgoing calls