# String

A single-line text input.

Add this field under `fields` in `.pages.yml`:

```yaml
- name: title
  type: string
  required: true
  options:
    maxlength: 120
```

A saved value in YAML or Markdown front matter might look like:

```yaml
title: A new story
```

## Options

| Option      | Description                   |
| ----------- | ----------------------------- |
| `minlength` | Minimum number of characters. |
| `maxlength` | Maximum number of characters. |

Check the format with [`pattern`](/configuration/fields/#validation). A string that becomes a link should only accept `https` addresses; see [links](/configuration/fields/#links).
