Merge pull request #393 from dotandimet/next

documentation pages should have titles
This commit is contained in:
Leo Horie 2015-01-06 13:21:54 -05:00
commit 704e8efe4f
4 changed files with 9 additions and 7 deletions

View file

@ -51,9 +51,11 @@ module.exports = function(grunt) {
var md2htmlTasks = {};
var makeTasks = function(layout, pages) {
pages.map(function(name) {
var src = inputFolder + "/" + name + ".md";
var title = (grunt.file.exists(src)) ? grunt.file.read(src).split(/\n/)[0].substring(3) + ' - ' : '';
md2htmlTasks[name] = {
options: {layout: inputFolder + "/layout/" + layout + ".html"},
files: [{src: [inputFolder + "/" + name + ".md"], dest: tempFolder + "/" + name + ".html"}]
options: {layout: inputFolder + "/layout/" + layout + ".html", templateData: { "topic": title }},
files: [{src: [src], dest: tempFolder + "/" + name + ".html"}]
}
})
};

View file

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>Mithril</title>
<title><%= topic %>Mithril</title>
<link href="lib/prism/prism.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
</head>
@ -89,4 +89,4 @@
</footer>
<script src="lib/prism/prism.js"></script>
</body>
</html>
</html>

View file

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>Mithril</title>
<title><%= topic %>Mithril</title>
<link href="lib/prism/prism.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
</head>
@ -59,4 +59,4 @@
</footer>
<script src="lib/prism/prism.js"></script>
</body>
</html>
</html>

View file

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>Mithril</title>
<title><%= topic %>Mithril</title>
<link href="lib/prism/prism.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
</head>