Skip to content

Commit

Permalink
Move from StrictUndefined to DebugUndefined in examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
aknrdureegaesr committed Dec 6, 2024
1 parent 404125d commit 98f02a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/theming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ instead of silently continuing with empty content, you might do this:
# Somewhere in conf.py:
def TEMPLATE_ENGINE_FACTORY(**args) -> jinja2.Environment:
augmented_args = dict(args)
augmented_args['undefined'] = jinja2.StrictUndefined
augmented_args['undefined'] = jinja2.DebugUndefined
return jinja2.Environment(**augmented_args)
Expand Down
2 changes: 1 addition & 1 deletion nikola/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ WARN_ABOUT_TAG_METADATA = False
# E.g., to configure Jinja2 to bark on non-existing values instead of silently omitting:
# def TEMPLATE_ENGINE_FACTORY(**args) -> jinja2.Environment:
# augmented_args = dict(args)
# augmented_args['undefined'] = jinja2.StrictUndefined
# augmented_args['undefined'] = jinja2.DebugUndefined
# return jinja2.Environment(**augmented_args)

# Put in global_context things you want available on all your templates.
Expand Down

0 comments on commit 98f02a2

Please sign in to comment.