Wasim's Site

Drupal .info.yml Generator

Generate a valid Drupal .info.yml file for a module, theme, or profile. Set name, type, dependencies, and core_version_requirement for Drupal 10 & 11.

Extension Metadata

Optional Keys

A bare name becomes drupal:name; use project:module for contrib.

Generated my_module.info.yml

Place at the root of your module folder.

The Drupal .info.yml File

Every Drupal module, theme, and install profile starts with a .info.yml file. It is the first thing Drupal reads to discover your extension, and a single YAML typo — a missing quote, a wrong indent, an invalid core_version_requirement — means your module simply won't show up on the Extend page. This generator builds a valid file from a simple form so you never lose time to YAML syntax.

Required and Common Keys

  • name: the human-readable name shown in the admin UI.
  • type: module, theme, or profile.
  • core_version_requirement: Composer constraint such as ^10 || ^11.
  • description: one-line summary on the Extend page.
  • package: groups the extension on the Extend page (e.g. Custom).
  • dependencies: other projects/modules that must be enabled.

How to Use This Generator

  1. Enter the name and machine name — the machine name becomes the file name and must match the folder.
  2. Pick the type and core version (Drupal 10 & 11 by default).
  3. Add dependencies and optional keys like php, configure, or hidden.
  4. Copy or download the .info.yml into your extension folder.

Frequently Asked Questions

What is a .info.yml file in Drupal?
It is the metadata file that tells Drupal a module, theme, or profile exists. Without a valid .info.yml file the extension will not appear on the Extend (or Appearance) page. It holds the human-readable name, type, description, dependencies, and the core compatibility constraint.
What does core_version_requirement do?
It declares which Drupal core versions the extension supports, using Composer semantic-version constraints. ^10 || ^11 means compatible with both Drupal 10 and 11. This replaced the old core: 8.x key and lets one codebase support multiple major versions.
How do I declare dependencies?
List each dependency as project:module. Core modules use the drupal project, e.g. drupal:node or drupal:views. This generator adds the drupal: prefix automatically when you enter a bare name; for contrib use the full project:module form.
Where does the file go and what should it be named?
It lives at the root of your extension folder and must be named <machine_name>.info.yml — for example my_module/my_module.info.yml. The machine name must match the folder name and use lowercase letters, numbers, and underscores.
What is the configure key for?
configure points to a route (e.g. my_module.settings) for the module's configuration page. Drupal then shows a Configure link next to the module on the Extend page. It is optional — omit it if your module has no settings form.

Official Resources