diff --git a/README.md b/README.md index 78ab3f7..5e25cc6 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,10 @@ Include 'js/angular-bootstrap.js', 'js/angular-bootstrap-prettify.js', 'js/docs- Copy additional css files to the documentation app +#### template +[default] null + +Allow to use your own template. Use the default template at src/templates/index.tmpl as reference. #### startPage [default] '/api' diff --git a/tasks/grunt-ngdocs.js b/tasks/grunt-ngdocs.js index 49e1a86..2c50ca3 100644 --- a/tasks/grunt-ngdocs.js +++ b/tasks/grunt-ngdocs.js @@ -211,10 +211,11 @@ module.exports = function(grunt) { imageLink: options.imageLink, bestMatch: options.bestMatch, deferLoad: !!options.deferLoad - }; + }, + template = options.template ? options.template : path.resolve(templates, 'index.tmpl'); // create index.html - content = grunt.file.read(path.resolve(templates, 'index.tmpl')); + content = grunt.file.read(template); content = grunt.template.process(content, {data:data}); grunt.file.write(path.resolve(options.dest, 'index.html'), content);