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

API Documentation #3

Open
EternalDeiwos opened this issue Aug 17, 2017 · 3 comments
Open

API Documentation #3

EternalDeiwos opened this issue Aug 17, 2017 · 3 comments

Comments

@EternalDeiwos
Copy link
Member

We need to discuss ways for us to publish documentation of our libraries. Currently how we have been doing this is by commenting our code in the jsdoc standard syntax and generating API documentation from it. Such API documentation should be available at https://anvilresearch.github.io/examplelib (published via gh-pages branch).

Things that we need to make this work would probably be something like a standardised, branded template design for the documentation pages and a root website (https://anvilresearch.github.io) with links to all of the other documentation pages.

@EternalDeiwos
Copy link
Member Author

So one of the things that I found making up the example in the JWK repo is that it it's really inconvenient to duplicate (and potentially update) API documentation appearing in the code and in the README...

Is there anyway to automate this? Suggestions?

@christiansmith
Copy link
Member

I wonder if there's a way to generate something like an API summary from jsdoc?

@christiansmith
Copy link
Member

A few general observations:

  1. I like jsdoc itself for this. The default template though is lacking in negative space and it's hard to parse visually. We need some design help to really make the content pop.

  2. The consistency between docs and code with generated docs is fantastic. But javadocs/jsdocs (for example) are often confusing in their monotony. Having a paragraph or more of description per method helps a great deal. Can we establish some kind of guidelines, like "how to write a good method description"? Possibly something that could be included with comment snippet in editors.

  3. Related to 2, inline examples are relevant and useful content to include. There's the @example tag. Should we consider always including at least one usage example?

  4. I noticed looking at the docs on the phone that long lines in the example code overflow very quickly. I didn't count, but it seems like less than 80 chars. It might be good as a rule of thumb to break objects properties/array items onto separate lines, declare variables to reference specific props outside of function calls, etc.

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

No branches or pull requests

2 participants