# Metadata in documents

**URL:** <https://talk.commonmark.org/t/metadata-in-documents/721>\
**Category:** Extensions\
**Created:** [September 28, 2014, 1:02am UTC](https://talk.commonmark.org/t/metadata-in-documents/721 "2014-09-28T01:02:46Z")\
**Posts on this page:** 1\
**Showing post:** 53

<div class="post-metadata">

**Author:** ![jgm](https://talk.commonmark.org/user_avatar/talk.commonmark.org/jgm/32/1360_2.png) [@jgm](https://talk.commonmark.org/u/jgm)\
**Post date:** [November 19, 2014, 11:15pm UTC](https://talk.commonmark.org/t/metadata-in-documents/721/53 "2014-11-19T23:15:13Z")

</div>

I think I agree with all of @jonschlinkert’s comments here.

But since it will presumably be common to have “hybrid” documents with some metadata at the top, followed by CommonMark text, I wonder if it would make sense to have the spec define a _recognizer_ for front-matter metadata, so that all CommonMark parsers would know to skip this and go right to to the text.

For example: if the document starts with a line containing `---`, skip to the next line containing just `---` or `...`, and start parsing CommonMark after that.

This would fall far short of specifying a metadata format. Between the opening and closing metadata signs, you could have anything you like – so, you could use YAML, or JSON, or XML, or lua tables, or a custom key-value store. Parsing this would be application-specific, but conforming CommonMark parsers would know to skip it.

The advantage is that, with this feature, you could run your hybrid metadata/CommonMark file through any CommonMark parser and get good results, not the garbage that would result if the metadata were parsed as CommonMark.

---

_[View the full topic](https://talk.commonmark.org/t/metadata-in-documents/721)._
