Info files (*.info.yml)
Every Drupal extension, a module, theme, or profile, is announced by one *.info.yml file whose base name is the extension’s machine name (node.info.yml is the node module). Drupal’s extension discovery scans for these files; InfoParserDynamic parses and validates them. This page lists the keys you write or meet in generated files.
Example
Section titled “Example”A module:
name: Event RSVPtype: moduledescription: 'Lets visitors respond to event content.'package: Customcore_version_requirement: ^11dependencies: - drupal:node - drupal:userconfigure: event_rsvp.settingsA theme:
name: First themetype: themedescription: 'A standalone theme generated from starterkit_theme.'core_version_requirement: ^11base theme: falselibraries: - core/normalize - first_theme/globalregions: header: Header content: Content footer: FooterRequired keys
Section titled “Required keys”These apply to every extension. The parser throws an InfoParserException if name or type is missing.
| Key | Type | Description |
|---|---|---|
name | string | Human-readable name shown in the admin UI. |
type | string | module, theme, or profile. |
core_version_requirement | string | Compatible core versions, e.g. ^11. Required for every extension outside core/, custom and contrib alike. Uses Composer semver syntax. |
Common keys (all extensions)
Section titled “Common keys (all extensions)”| Key | Type | Description |
|---|---|---|
description | string | One-sentence summary shown beside the name. |
package | string | Groups the extension under a heading on the extend page (e.g. Custom, Field types). |
dependencies | list | Other extensions required, as project:machine_name, optionally with a version: drupal:node, paragraphs:paragraphs (>=1.0). |
version | string | Set automatically by drupal.org packaging. The literal VERSION is replaced with the running core version. |
lifecycle | string | experimental, stable (default), deprecated, or obsolete. |
lifecycle_link | url | Required when lifecycle is deprecated or obsolete: a link explaining the status. |
hidden | bool | Hide from the extend page (used by test and utility extensions). |
Module-only keys
Section titled “Module-only keys”| Key | Type | Description |
|---|---|---|
configure | string | Route name of the module’s settings page; renders a “Configure” link on the extend page. |
required | bool | The module cannot be uninstalled (core uses this for system, user). |
php | string | Minimum PHP version. |
Theme-only keys
Section titled “Theme-only keys”| Key | Type | Description |
|---|---|---|
base theme | string | false | The parent theme to inherit from, or false for a standalone theme. Required: a theme that declares neither is an error. |
libraries | list | Asset libraries attached to every page, as extension/library. |
libraries-override | map | Replace, remove, or swap assets in another library. |
libraries-extend | map | Append your libraries whenever a named library loads. |
regions | map | Block regions as machine_name: Label. Declaring this replaces the default region set; keep a content region. |
regions_hidden | list | Regions that exist but are hidden from the block UI. |
logo | string | Path to the logo, relative to the theme. Defaults to logo.svg. |
screenshot | string | Path to the appearance-page screenshot. Defaults to screenshot.png. |
ckeditor5-stylesheets | list | Stylesheets loaded inside the CKEditor 5 editing area. |
features | list | Toggle which theme features (logo, site name, etc.) the theme settings form exposes. |
generator | string | Written by the starterkit theme generator to record the source theme and its version, e.g. starterkit_theme:11.4.0. Informational only. |
Profile-only keys
Section titled “Profile-only keys”| Key | Type | Description |
|---|---|---|
install | list | Modules to install with the profile. |
themes | list | Themes to install with the profile. |
Related
Section titled “Related”- Scaffold a module and generate a theme build these files key by key.
- Asset libraries covers
libraries,libraries-override, andlibraries-extendin depth. - The
extending Drupal topicon api.drupal.org.
Was this page helpful?
Drupal is a registered trademark of Dries Buytaert.