Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use safe access for undefined variables #75

Open
fulldecent opened this issue Feb 9, 2023 · 0 comments
Open

Use safe access for undefined variables #75

fulldecent opened this issue Feb 9, 2023 · 0 comments

Comments

@fulldecent
Copy link

Currently there is this code:

<html lang="{{ page.lang | default: site.lang | default: "en-US" }}">

This causes an error when rendering the page in strict mode. In the config use:

# Cause a build to fail if there is a YAML syntax error in a page's front matter.
strict_front_matter: true

# https://jekyllrb.com/docs/configuration/liquid/
liquid:
  error_mode: strict
  strict_variables: true
  strict_filters: true

Please update this to use the safe checkers like: site contains "title".

And of course upstream they should also have default suppress these errors. But whether that is implemented or not, the GitHub Pages default theme should work in strict mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant