You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am serving a version of my site for users to view, with additional safety checks, menus and pages that won't be published, and also some debug helpers for me to try and facilitate resolving any issues. I thus have two config files knocked up by a script if the base config changes, and it seems others also use separate configs for deployment.
I include the current page's metadata, as well as the site config, in a debug window so that I can more easily see what Zola has finally seen when rendering the current page, when serving live. This is very useful when there are bits of front matter missing or other situations where something is null and the engine has wiped out the relevant parts of the output HTML. It'd be helpful for debugging purposes to be able to include the path to the current config in there so that I can sanity-check what file is being used.
However, currently we have mode inserted into the config to tell us how zola was launched. Therefore, if this is already a feature, it might make sense to be able to access all of the CLI arguments within the Tera templates, similarly for the purpose of verification and debugging (Don't use these to alter your site!!!). A list would be a start, although if there's some sort of hash used internally that can be exposed easily then I think this would of course be much better (e.g. {drafts: false} is better to index into than iterating over a list looking for --drafts and trying to parse the next item. But that's still an option and at least canonical.
Thanks
Environment
Zola version: 0.19.2
The text was updated successfully, but these errors were encountered:
Feature Request
I am serving a version of my site for users to view, with additional safety checks, menus and pages that won't be published, and also some debug helpers for me to try and facilitate resolving any issues. I thus have two config files knocked up by a script if the base config changes, and it seems others also use separate configs for deployment.
I include the current page's metadata, as well as the site config, in a debug window so that I can more easily see what Zola has finally seen when rendering the current page, when serving live. This is very useful when there are bits of front matter missing or other situations where something is null and the engine has wiped out the relevant parts of the output HTML. It'd be helpful for debugging purposes to be able to include the path to the current config in there so that I can sanity-check what file is being used.
However, currently we have
mode
inserted into the config to tell us how zola was launched. Therefore, if this is already a feature, it might make sense to be able to access all of the CLI arguments within the Tera templates, similarly for the purpose of verification and debugging (Don't use these to alter your site!!!). A list would be a start, although if there's some sort of hash used internally that can be exposed easily then I think this would of course be much better (e.g.{drafts: false}
is better to index into than iterating over a list looking for--drafts
and trying to parse the next item. But that's still an option and at least canonical.Thanks
Environment
Zola version: 0.19.2
The text was updated successfully, but these errors were encountered: