Using Text Inputs to edit your data

Last modified: November 22nd, 2023

Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.

Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.

These inputs are for editing plain text in your data.

Text#

Single line input for short text values.

Text inputs are shown for inputs configured with the type text, or for inputs not matching any other naming convention.

Screenshot of text input field
Naming convention
copied
tagline: Hand-crafted clothing.
Naming convention
copied
{
  "tagline": "Hand-crafted clothing."
}
Naming convention
copied
tagline = "Hand-crafted clothing."
Input configuration
copied
footer_message: Look up!
_inputs:
  footer_message:
    type: text
Input configuration
copied
{
  "footer_message": "Look up!",
  "_inputs": {
    "footer_message": {
      "type": "text"
    }
  }
}
Input configuration
copied
footer_message = "Look up!"

[_inputs.footer_message]
type = "text"

Textarea#

Expanded text input for longer and/or multi-line text.

Textarea inputs are shown for inputs configured with the type textarea, or for input keys matching:

  • textarea
  • *_textarea
  • description
  • *_description
Screenshot of large text input field
Naming convention
copied
description: >-
  Products are crafted in-house by hand, making each piece a labor of love and
  an exercise in craftsmanship.
Naming convention
copied
{
  "description": "Products are crafted in-house by hand, making each piece a labor of love and an exercise in craftsmanship."
}
Naming convention
copied
description = "Products are crafted in-house by hand, making each piece a labor of love and an exercise in craftsmanship."
Input configuration
copied
footer_copy: |-
  We hope you love our products.
  We are proud of them!
_inputs:
  footer_copy:
    type: textarea
Input configuration
copied
{
  "footer_copy": "We hope you love our products.\nWe are proud of them!",
  "_inputs": {
    "footer_copy": {
      "type": "textarea"
    }
  }
}
Input configuration
copied
footer_copy = """
We hope you love our products.
We are proud of them!"""

[_inputs.footer_copy]
type = "textarea"

Email#

Single line input for email addresses.

Email inputs are shown for inputs configured with the type email, or for input keys matching:

  • email
  • *_email
  • email_address
  • *_email_address
Screenshot of two email input fields using the email and email_address keys
Naming convention
copied
email: support@cloudcannon.com
email_address: support@cloudcannon.com
Naming convention
copied
{
  "email": "support@cloudcannon.com",
  "email_address": "support@cloudcannon.com"
}
Naming convention
copied
email = "support@cloudcannon.com"
email_address = "support@cloudcannon.com"
Input configuration
copied
to: support@cloudcannon.com
_inputs:
  to:
    type: email
Input configuration
copied
{
  "to": "support@cloudcannon.com",
  "_inputs": {
    "to": {
      "type": "email"
    }
  }
}
Input configuration
copied
to = "support@cloudcannon.com"

[_inputs.to]
type = "email"

Disabled#

Single line input that cannot be edited for any value.

Disabled inputs are shown for inputs configured with an unknown type, or for inputs with values that cannot be edited with the configured type.

Text is stored unquoted if possible. Unquoted text containing only numbers with commas may require a workaround in Jekyll.

Options#

Text inputs have the following available options:

empty_type - string#

Set how an ‘empty’ value will be saved. Does not apply to existing empty values. Can be one of the following:

  • string - an empty value for this input will be stored as "".
  • null - an empty value for this input will be stored as a null value (default). This does not apply to TOML files.

Valid values#

Documented below are the valid formats for text, textarea, and email inputs.

The lists of examples are non-exhaustive.

Empty/null value:

  • text:

Any valid string (quoted or unquoted):

  • text: ""
  • text: ''
  • text: any string
  • text: "any string"
  • text: 'any string'

Any valid multiline string:

  • text: >
    multiline string
  • text: >-
    multiline string
  • text: >+
    multiline string
  • text: |
    multiline string
  • text: |-
    multiline string
  • text: |+
    multiline string

Any valid string:

  • text = ""
  • text = "any string"

Any valid escaped string:

  • text = ''
  • text = 'any string (literal)'

Any valid multiline string:

  • text = """
    multiline string"""
  • text = """\
    multiline string (trimmed) \
    """
  • text = '''
    literal multiline string'''

Null value:

  • "text": null

Any valid string:

  • "text": ""
  • "text": "any string"

Any valid multiline string:

  • "text": "multiline \n string"
Open in a new tab