Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate table of contents #80

Open
dandv opened this issue Jan 12, 2015 · 3 comments
Open

Generate table of contents #80

dandv opened this issue Jan 12, 2015 · 3 comments
Labels

Comments

@dandv
Copy link

dandv commented Jan 12, 2015

grunt-jsdox can generate a TOC of the files that make up an API, but within a file, you're left to manually navigating through headings. A per-file ToC would be great.

@psq psq added the question label Jan 12, 2015
@psq
Copy link
Contributor

psq commented Jan 12, 2015

this probably something you could achieve today by customizing your template. Something like this to get you started.

{{#classes}}
  {{#members}}
    generate link here for {{name}}
  {{/members}}
{{/classes}}

of course, you'd also need to generate the <a name="..."> at each heading you want to refer to.

@dandv
Copy link
Author

dandv commented Jan 13, 2015

That's a bit over my head, but should a ToC not be standard with all generated documentation of significant length? The UX for navigating, say, http://nodejs.org/api/http.html, would be far worse without a ToC.

@psq
Copy link
Contributor

psq commented Jan 13, 2015

Whether the base templates should include a ToC or not hasn't come up yet, so perhaps this wasn't very high on people's list. For larger files, I could see this to be useful, so we'll keep this one open in case someone has something they'd like to contribute. And if not, someone might take it on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants