Modifying the grunt-ngDocs template

How do I change the look & feel template on a website generated by grunt-ngDocs ?

The ultimate goal is to integrate the generated documentation within the website.

For example, we want to display the following tabs for each section

  • Demo (focused on the final user rendering)
  • Code (for developers)

To do this, we need to change the template used by ngDocs, but how?

+3


source to share


2 answers


To create different tabs, just add another Target to the ngdocs task:

ngdocs: {
  options: {        
    ...
    startPage: '/code' // this is displayed first
    ...        
  },
  demo: {
    src: ['path/to/demo/files'],
    title: 'Demo'
  },
  code: {
    src: ['path/to/code/files'],
    title: 'Code'
  }
}

      

Now about the template.



You can provide your template file and CSS file .

You can even create your own Navigation Template

+3


source


You can create a template supplied with your own css files that you can copy each time you create documents.



See https://www.npmjs.com/package/grunt-ngdocs#styles ? where you can specify styles in the options object used to initialize your docs in grunt

0


source







All Articles