This commit is contained in:
Ritchie Martori
2012-04-11 19:12:32 -07:00
parent 46482aa162
commit 0ebe964aa2
9 changed files with 792 additions and 782 deletions

21
make.js
View File

@@ -7,14 +7,19 @@ target.all = function() {
target.docs = function() {
cd('docs');
ls('*.markdown').forEach(function(file) {
var target = path.basename(file, path.extname(file)) + '.html';
var header = cat('layout/header.html');
var body = exec('markdown ' + file, {silent: true}).output;
var footer = cat('layout/footer.html');
(header + body + footer).to(target);
var header = cat('layout/header.html')
, body = '';
// index should be first
body += exec('markdown ' + 'index.markdown', {silent: true}).output;
ls('*.markdown').forEach(function(file, i, arr) {
if(file != 'index.markdown') {
body += exec('markdown ' + file, {silent: true}).output;
if(i < arr.length - 1) body += '<hr />';
}
});
var footer = cat('layout/footer.html');
(header + body + footer).to('index.html');
cd('..');
}