aboutsummaryrefslogtreecommitdiff
path: root/templates/html.template
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-11 20:37:06 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-11 21:18:46 -0800
commite8ad4ba43c7c187a5b6ee6025bc6039488d7f420 (patch)
tree09f1c8d8765796962b06bd5dfdea5b7c3ed1a241 /templates/html.template
parent6b1407d2090057bb951ecd0b239b659c138cc6b8 (diff)
downloadpandoc-e8ad4ba43c7c187a5b6ee6025bc6039488d7f420.tar.gz
Preliminary support for HTML5.
+ Added writerHtml5 writer option. + Added --html5 option. + Added support for lang in html tag (so you can do 'pandoc -s --V lang=en', for example). + Updated html template with conditionals for HTML5. + When HTML5 selected, use <header> tag around title in document, and use <section> tags instead of <div>s if --section-divs specified.
Diffstat (limited to 'templates/html.template')
-rw-r--r--templates/html.template19
1 files changed, 17 insertions, 2 deletions
diff --git a/templates/html.template b/templates/html.template
index bd1864ff0..eabda4f44 100644
--- a/templates/html.template
+++ b/templates/html.template
@@ -1,8 +1,17 @@
+$if(html5)$
+<!DOCTYPE html>
+<html$if(lang)$ lang="$lang$"$endif$>
+$else$
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>
+$endif$
<head>
<title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
+$if(html5)$
+ <meta charset="utf-8" />
+$else$
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+$endif$
<meta name="generator" content="pandoc" />
$for(author)$
<meta name="author" content="$author$" />
@@ -16,7 +25,7 @@ $highlighting-css$
</style>
$endif$
$for(css)$
- <link rel="stylesheet" href="$css$" type="text/css" />
+ <link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
$endfor$
$if(math)$
$math$
@@ -30,7 +39,13 @@ $for(include-before)$
$include-before$
$endfor$
$if(title)$
+$if(html5)$
+<header>
+$endif$
<h1 class="title">$title$</h1>
+$if(html5)$
+</header>
+$endif$
$endif$
$if(toc)$
$toc$