# 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:** 15

<div class="post-metadata">

**Author:** ![mofosyne](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [October 28, 2014, 12:34am UTC](https://talk.commonmark.org/t/metadata-in-documents/721/15 "2014-10-28T00:34:46Z")

</div>

Btw just noticed that ascii doc way of doing document declaration is

```
**Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.**

```

perhaps we can auto recognize YAML blocks under a header( as metadata) or the start of a page (as document declaration).

First 3 line is the document declaration for the whole page. There is also a local meta data under the first header “The beginnings of time”

```
!CommonMark: 0.1.23-github.username.projectname
 Title: Title for the top bar of any browser
 Date: 32-4-2002

==========================
The beginnings of time
==========================
Date_Edited: 24th of jan 2043 
Last_Edit_by: Burko Ruffo

In the beginnings there were only darkness. But then with a keystroke, there was light.

```

metadata placed in div

```
<div title="Title for the top bar of any browser" date="32-4-2002" >

 <section>

  <div style="metadata date_edited">24th of jan 2043</div>
  <div style="metadata last_edit_by">Burko Ruffo</div>

  <h1> The beginnings of time </h1>
  <p>
     In the beginnings there were only darkness. 
     But then with a keystroke, there was light.
  </p>
 </section>

</div>

```

Hmmm… the document declaration metadata would probably be encased in meta tag and placed on top of html page.

* * *

This has the advantage of allowing sectioning of the page based on header or rules. E.g. with ruling for slideshow.

Should we use `<section>` ? or is div good enough? For this example, I’ll use section tag.

```
----
:id: slide1
:class: slidestyle
note: this is a test slide    

# slide title

normal text here

---

```

renders as

```
 <hr>

 <section id="slide1" style="slidestyle" >
  <div class="metadata note" >
   this is a test slide    
  </div>
  <h1> slide title </h1>
  <p>
     normal text here
  </p>
 </section>

 <hr>
```

---

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