Skip to content

Metadata does not appear to be standardized #2922

Open
@DougReeder

Description

@DougReeder

There does not appear to be a standard for metadata field names (aside from https://www.11ty.dev/docs/data-eleventy-supplied/) and metadata file locations, so that plugins can all operate from the same set of metadata, when using the Data Cascade

Specific conflicts are that https://github.com/11ty/eleventy-base-blog stores metadata in /_data/metadata.js and https://github.com/artstorm/eleventy-plugin-seo (yes, not maintained by 11ty) suggests storing metadata in /src/_data/seo.json. eleventy-base-blog uses author.name, author.email and author.url fields, while eleventy-plugin-seo uses just author. eleventy-base-blog expects each page to have a description in front matter, while eleventy-plugin-seo expects excerpt.

Different plugins will need different fields, and eleventy can't enforce usage, but the eleventy documentation could define a standard location, field names and definitions (for example, "url is the canonical URL of the site, including a URL path, while origin is the canonical origin, without a URL path" and "title is the page title, while metadata.title is the site title").

Then plugins wouldn't need to invent their own schema. There's no need to go full Dublin Core - just having a standard defined in eleventy itself would allow plugins to harmonize.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions