Editing / Options

Input Options

Hidden Fields

Control which front matter fields your editors see with the hidden option.

_options:
  layout:
    hidden: true

Hidden fields can be edited with modal-style Editor Links.

Alternatively, hide front matter fields by prefixing the key with an underscore (e.g. _hidden_text).

Code Blocks

Change the appearance and behaviour of your front matter code blocks to fit your use case and brand.

_options:
  code_block:
    tab_size: 2
    show_gutter: false
  javascript_code_block:
    tab_size: 4
    theme: dawn
Option Values
tab_size Integer (optional, defaults to 4)
theme String, one from themes (optional, defaults to monokai)
show_gutter true or false (optional, defaults to true)

tab_size controls how many spaces lines are auto indented.

theme controls the appearance of the editor.

show_gutter toggles line numbers and code folding controls.

Array Defaults

Provides initial values for newly created items in arrays. Configured globally in _config.yml or per file in front matter with a _defaults object:

_defaults:
image_path: /images/placeholder.png

Alternatively, configure on a custom scope with Jekyll defaults:

defaults:
- type: ''
values:
_defaults:
  image_path: /images/placeholder.png

New array items clone the structure from the existing array items. Array defaults populate that structure for the same keys in _defaults.

---
_defaults:
image_path: /images/placeholder.png
images:
- image_path: /images/sunset.png
  title: Sunset

# Adding an item to the array is prepopulated as:
- image_path: /images/placeholder.png
  title:
---

Array defaults also apply when editing CSV, YAML and JSON files.

arrow_back

Options / Adding Options

Read previous doc
arrow_forward

Options / Upload Options

Read next doc