This project is not covered by Drupal’s security advisory policy.
Content Packages provides a Git-friendly workflow for managing selected Drupal content as canonical package files with YAML front matter. It is designed for teams that want important editorial, documentation, demo, or starter content to move through the same review and deployment process as code and configuration.
A package file can be validated, imported into Drupal, exported back from Drupal, and diffed against the current Drupal entity state. Imports upsert by UUID so the same package can be replayed across environments without creating duplicate content.
Use Content Packages when you want
- Selected content entities stored in Git.
- Content changes reviewed in pull requests.
- Repeatable demo, starter, documentation, or seed content.
- Local-first content authoring that can be replayed on another Drupal environment.
- Content drift detection between Git package files and Drupal entity values.
- Bundle-specific package mappings through package type plugins.
- Selected recursive content graphs exported as reviewable ZIP or JAR archives.
Features
- Validate package files before import.
- Import package files into Drupal content entities.
- Export Drupal content entities back to canonical package files.
- Diff package files against Drupal entity values.
- Upsert content by UUID.
- Support legacy node Markdown packages.
- Support schema v2 content entity packages with explicit fields.
- Support package-relative file and image assets.
- Support asset-backed standard file/image media references.
- Support translations.
- Support inline components for entity_reference_revisions fields when supporting modules are installed.
- Export selected content and supported recursive entity references to ZIP or JAR archives.
- Add an archive integrity manifest with byte sizes, SHA-256 hashes, root metadata, package metadata, asset paths, omitted depth-limited references, and graph closure data.
- Verify archives before use with content-packages:archive:verify, including hash and size checks, safe path checks, package front matter parsing, asset hash checks, unexpected-entry detection, and graph closure checks.
Archive scope
Archive export starts with a selected root entity and follows supported UUID-backed entity_reference targets up to the configured depth. Standard file/image media references currently stay asset-backed: the archive includes media source files and media bundle/UUID metadata, but does not export media entities as standalone package documents yet. Full media-entity archive export is planned as a future opt-in mode.
Not full-site content sync
Content Packages is intentionally scoped to selected content packages. It is not intended to replace broad site-wide content synchronization, UI-driven content copy workflows, Layout Builder portability, or Drupal's full entity serialization ecosystem.
Requirements
The module requires the CommonMark and HTML-to-Markdown PHP libraries through Composer. Archive export and verification require PHP's ZipArchive extension. Optional integrations activate only when supporting modules such as Media, Entity Reference Revisions, and Paragraphs are installed.
Similar projects
- Use Single Content Sync when you need broad site-wide entity synchronization, Layout Builder portability, UI-driven workflows, or full parity with Drupal's entity serialization ecosystem.
- Use Default Content when you are shipping install-time content with a module, recipe, distribution, or install profile.
- Use Markdown when your main need is Markdown authoring/rendering inside Drupal text formats.
- Use Migrate default content or Entity Migrate Export when your workflow should be based on Drupal's Migrate API.
Support and documentation
Use the Drupal.org issue queue for bug reports, support requests, and feature discussions. The project README includes additional details about package formats, archive export, integrity verification, assets, references, and creating custom package type plugins.
Project information
- Project categories: Content editing experience, Developer tools, Import and export
- Created by alex ua on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Third alpha release with archive verification hardening and metadata cleanup.
