YAML, which stands for YAML Ain't Markup Language, is a human-readable data serialization format that's been widely adopted in a variety of use cases in Drupal 8. Anyone wanting to write modules or themes for Drupal 8 will need to understand YAML syntax. Even site-builders are likely to encounter YAML, at least in passing, as YAML is the data serialization format of choice for Drupal 8's configuration management system as well.
You can spot YAML files in your Drupal codebase by looking for the
- Review updated/exported configuration prior to deploying it to the live site
- Use YAML files in a theme to provide metadata about the theme, asset libraries, and more
- Work with YAML files in a module to define routes, menu items, and basic module information
YAML syntax is not likely to change, nor is Drupal's use of it. If anything, the specific key/value pairs that Drupal uses will evolve over time.
- An Introduction to YAML
- Learn all about YAML syntax, and how to read and write YAML files. Start here if you've never used YAML before or have questions about its syntax.
- Describe Your Theme with an Info File
- Use YAML to create an info file that describes a custom theme's name, its regions, and other features.
- Create an Info File for a Module
- Define a new custom module by creating a YAML info file with metadata about the module.