Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
feat(task): allow custom template
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilker Cat authored and m7r committed Jun 29, 2015
1 parent 4c17f08 commit c8057c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions tasks/grunt-ngdocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c8057c3

Please sign in to comment.