Regarding site_vars
#78
kjaymiller
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is some general guidance around site variables or
site_vars
.site_vars
are a dictionaryThis means that you can overwrite the values in
site_vars
so it is recommended that you use thedict.update()
method to add variables.site_vars
are passed into accessible in Jinja templatesSite variables are currently used for Jinja templates. They take advantage of the the environment's
globals
.I'd love to explore using them in other areas (such as pre-compiled content).
This will render the html
site_vars have the least priority in values
This means that a variable passed into a
Page
orCollection
object will overwrite the site variable in a Jinja template.Beta Was this translation helpful? Give feedback.
All reactions