Template frontmatter

Golden Gate Club, San Francisco

A few years ago the static-site bloggig tool Jekyll popularised the idea of text files containing 'front matter', which is usually Yaml-formatted metadata put between some delimeters at the top of a file. This works pretty well in MediaWiki as well, with a slightly different format (i.e. templates).

Yaml Wikitext HTML
---
type: book
author: John Smith
publication_date: 1923
---
{{book
| author = John Smith
| publication_date = 1923
}}
<div itemscope itemtype="http://schema.org/Book">
  A book by <span itemprop="author">John Smith</span>,
  published in <span itemprop="date">1923</span>.
</div>

I find it useful to think of wiki pages as representing instances of some sort of 'entity', and the template at the top is what defines this.

With the addition of Cargo, all this metadata becomes queryable from elsewhere in the wiki.


Comments on this blog post+ Add a comment
No comments yet