Skip to content

Use safe access for undefined variables #75

@fulldecent

Description

@fulldecent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions