Null values in frontmatter

---
empty_value:

null_value: null

empty_string: ''

empty_array: []
---
{"layout":"page","title":"Null","content":"## Null values in frontmatter\n\n```liquid\n---\nempty_value:\n\nnull_value: null\n\nempty_string: ''\n\nempty_array: []\n---\n{{ page | jsonify }}\n```\n\n```json5\n{\n  \"empty_value\":null,\n  \"nil_value\":  null,\n  \"empty_string\":\"\",\n  \"empty_array\":[],\n  // ...\n}\n```\n\nNotes:\n\n- You can use an empty value or `null` in your frontmatter or YAML files.\n- `nil` will become `\"nil\"`, but in plain YAML outside of Jekyll you would use `nil`. \n- You can also use null forms of chosen types.\n\n\n## Layouts\n\nFor layouts, you can use a special built-in `none` layout:\n\n```liquid\n---\nlayout: none\n---\n```\n\nIt is not really a null value, as it is still as string.","dir":"/cheatsheets/jekyll/liquid/","excerpt":null,"name":"null.md","path":"cheatsheets/jekyll/liquid/null.md","url":"/cheatsheets/jekyll/liquid/null.html"}
{
  "empty_value":null,
  "nil_value":  null,
  "empty_string":"",
  "empty_array":[],
  // ...
}

Notes:

  • You can use an empty value or null in your frontmatter or YAML files.
  • nil will become "nil", but in plain YAML outside of Jekyll you would use nil.
  • You can also use null forms of chosen types.

Layouts

For layouts, you can use a special built-in none layout:

---
layout: none
---

It is not really a null value, as it is still as string.