Problem/Motivation

The markdown front matter only exposes title, url, and flat meta-* keys for metatags. This makes it hard for tools (mkdocs, LLMs, static site generators) to consume structured entity metadata, and the flat naming does not reflect the natural hierarchy of metatag groups.

Proposed resolution

Entity block

Add a configurable entity: key to the front matter:

entity:
  id: 405
  type: node
  bundle: article
  status: 1
  langcode: en

Each property is individually toggleable from the settings form.

Hierarchical meta: block

Replace flat meta-* keys with a nested meta: block. Metatag plugin IDs are split recursively on _ to produce natural sub-groups:

meta:
  title: "..."
  og:
    title: "..."
  schema:
    article:
      "@type": "Article"
      name: "..."

User interface changes

The settings form at /admin/config/content/content-first gains:

An Entity properties details element with checkboxes for id, type, bundle, status, and langcode (all enabled by default).
Metatag checkboxes reorganised by their Drupal metatag plugin group (via MetatagManager::sortedTags()), with human-readable group titles (Open Graph, Twitter Cards, Schema Article, etc.), eliminating the duplicate labels that appeared when multiple schema types shared property names.

API changes

None.

Data model changes

New entity_properties mapping added to content_first.settings config. A hook_update_N sets defaults for existing installations.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gedur created an issue. See original summary.

gedur’s picture

Issue summary: View changes
gedur’s picture

Status: Active » Needs review

PLease review

eduardo morales alberti made their first commit to this issue’s fork.

eduardo morales alberti’s picture

Removed duplicated variable definition $config on src/Builder/ContentFirstBuilder.php
Use Symfony Yaml dump instead of the custom method, on src/RenderedContent.php as it already covers all format cases.

eduardo morales alberti’s picture

Status: Needs review » Fixed

Reviewed and tested on real site, ready

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.