pandoc/default.epub3
John MacFarlane 2d5491bc0b EPUB, EPUB3 templates: Handle structured metadata on titlepage.
Previously we just expected 'title', 'subtitle', 'author', 'date'.

Now we still support those, but also support the format recommended
for epub metadata in the pandoc README:

---
title:
- type: main
  text: My Book
- type: subtitle
  text: An investigation of metadata
creator:
- role: author
  text: John Smith
- role: editor
  text: Sarah Jones
identifier:
- scheme: DOI
  text: doi:10.234234.234/33
publisher:  My Press
rights:  (c) 2007 John Smith, CC BY-NC
...
2014-08-31 12:00:37 -07:00

56 lines
1.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ xml:lang="$lang$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<title>$pagetitle$</title>
$if(quotes)$
<style type="text/css">
q { quotes: "“" "”" "" ""; }
</style>
$endif$
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" type="text/css" href="$css$" />
$endfor$
</head>
<body>
$if(titlepage)$
<section epub:type="titlepage">
$for(title)$
$if(title.type)$
<h1 class="$title.type$">$title.text$</h1>
$else$
<h1 class="title">$title$</h1>
$endif$
$endfor$
$if(subtitle)$
<h1 class="subtitle">$subtitle$</h1>
$endif$
$for(author)$
<h2 class="author">$author$</h2>
$endfor$
$for(creator)$
<h2 class="$creator.type$">$creator.text$</h2>
$endfor$
$if(publisher)$
<p class="publisher">$publisher$</p>
$endif$
$if(date)$
<p class="date">$date$</p>
$endif$
$if(rights)$
<p class="rights">$rights$</p>
$endif$
</section>
$else$
$body$
$endif$
</body>
</html>