Skip to content

[Feature request]: official plugin for auto-generating title and description from Markdown content #470

Open

Description

@maximepvrt

Description

I would like to propose an official plugin for Comark that automatically extracts and populates title and description into the document metadata when they are missing from the Frontmatter.

If a file does not explicitly declare these fields in its Frontmatter, the plugin should automatically infer:

  • title: From the first h1 (# Title) in the document.
  • description: From the text of the first paragraph.

Motivation

  • Ecosystem parity & smooth migration: MDC (@nuxtjs/mdc) automatically handles title and description extraction. Providing an official plugin for Comark ensures feature parity and makes migrating existing projects effortless.
  • Preventing redundant logic: Frontmatter fallback extraction is a standard requirement for content sites, blogs, and documentation. An official plugin avoids every developer having to write and maintain custom AST traversal logic.
  • Better DX for dynamic content: Content generated by third-party tools, CMS exports, or AI workflows often lacks YAML Frontmatter. Having an official, well-maintained plugin ensures consistent metadata handling across all Comark projects.

Proposed solution

No response

Alternatives considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions