Skip to content

ReferenceFor module developers, theme developersDrupal 11

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.

A module:

name: Event RSVP
type: module
description: 'Lets visitors respond to event content.'
package: Custom
core_version_requirement: ^11
dependencies:
- drupal:node
- drupal:user
configure: event_rsvp.settings

A theme:

name: First theme
type: theme
description: 'A standalone theme generated from starterkit_theme.'
core_version_requirement: ^11
base theme: false
libraries:
- core/normalize
- first_theme/global
regions:
header: Header
content: Content
footer: Footer

These apply to every extension. The parser throws an InfoParserException if name or type is missing.

KeyTypeDescription
namestringHuman-readable name shown in the admin UI.
typestringmodule, theme, or profile.
core_version_requirementstringCompatible core versions, e.g. ^11. Required for every extension outside core/, custom and contrib alike. Uses Composer semver syntax.
KeyTypeDescription
descriptionstringOne-sentence summary shown beside the name.
packagestringGroups the extension under a heading on the extend page (e.g. Custom, Field types).
dependencieslistOther extensions required, as project:machine_name, optionally with a version: drupal:node, paragraphs:paragraphs (>=1.0).
versionstringSet automatically by drupal.org packaging. The literal VERSION is replaced with the running core version.
lifecyclestringexperimental, stable (default), deprecated, or obsolete.
lifecycle_linkurlRequired when lifecycle is deprecated or obsolete: a link explaining the status.
hiddenboolHide from the extend page (used by test and utility extensions).
KeyTypeDescription
configurestringRoute name of the module’s settings page; renders a “Configure” link on the extend page.
requiredboolThe module cannot be uninstalled (core uses this for system, user).
phpstringMinimum PHP version.
KeyTypeDescription
base themestring | falseThe parent theme to inherit from, or false for a standalone theme. Required: a theme that declares neither is an error.
librarieslistAsset libraries attached to every page, as extension/library.
libraries-overridemapReplace, remove, or swap assets in another library.
libraries-extendmapAppend your libraries whenever a named library loads.
regionsmapBlock regions as machine_name: Label. Declaring this replaces the default region set; keep a content region.
regions_hiddenlistRegions that exist but are hidden from the block UI.
logostringPath to the logo, relative to the theme. Defaults to logo.svg.
screenshotstringPath to the appearance-page screenshot. Defaults to screenshot.png.
ckeditor5-stylesheetslistStylesheets loaded inside the CKEditor 5 editing area.
featureslistToggle which theme features (logo, site name, etc.) the theme settings form exposes.
generatorstringWritten by the starterkit theme generator to record the source theme and its version, e.g. starterkit_theme:11.4.0. Informational only.
KeyTypeDescription
installlistModules to install with the profile.
themeslistThemes to install with the profile.

Was this page helpful?

Drupal is a registered trademark of Dries Buytaert.