Search code examples
javascriptbackbone.jsgruntjsdocumentation-generationdocco

A better way to organize Docco pages


I have a large Backbone-style application (~100 files), and I'm trying to select the best method to automate documentation.

I'm experimenting with docco, (with grunt-docco2) but I'm running into issues. With all the files I have list on the left, and then go down past the window with no way to scroll. Is it possible to group them, maybe in style of a dropdown?

Also, is it possible to have an index page generated or something? Docco seems to do 99% of everything I want, but these two things are driving me crazy!


Solution

  • Okay, I have not found a way to generate a solid table of contents.

    However, I have found a way to stop the crazy scrolling.

    Where #jump_page is defined in docco.css, change it to :

     #jump_page {
        padding: 5px 0 3px;
        margin: 0 0 25px 25px;
        max-height:750px;
        overflow: scroll;
     }
    

    I then took my altered stylesheet and passed it in instead using the docco css option.

    It's not the best solution, but it will set a maximum height and allow scrolling, so if you have a plethora of files you want to document, you can navigate them more quickly.