Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Awesome API Documentation Endeavour #615

Closed
2 tasks done
dignifiedquire opened this issue Nov 22, 2016 · 35 comments
Closed
2 tasks done

Awesome API Documentation Endeavour #615

dignifiedquire opened this issue Nov 22, 2016 · 35 comments
Labels
awesome endeavour help wanted Seeking public contribution on this issue

Comments

@dignifiedquire
Copy link
Member

dignifiedquire commented Nov 22, 2016

We want to improve the documentation in the whole project and for that this endeavour exists.
To improve the documentation we settled on using jsdoc style inline comments to describe the APIs and after that using documentation.js to generate beautiful docs.

If you want to help out, please comment on this issue which module you are tackling.

Test Instructions

Currently the integration into aegir is not yet done, so when documenting you can use documentation.js directly to test that everything works fine.

  • Update aegir to ^9.2.0
  • Add a script to package.json with "docs": "aegir-docs"
  • Run npm run docs
  • open docs/index.html in your favorite browser

Modules

IPFS

Name JSDOC Assignee
js-ipfs-bitswap
js-libp2p-ipfs-browser
js-libp2p-ipfs
js-ipfs-block
js-ipfs-api ipfs-inactive/js-ipfs-http-client#469
 js-ipfs #651 @dignifiedquire
 js-ipfs-unixfs-engine
js-ipfs-block-service
 js-fs-pull-blob-store
js-idb-pull-blob-store
 js-ipfs-repo
interface-pull-blob-store

IPLD

Name JSDOC Assignee
js-cid multiformats/js-cid#9 @dignifiedquire
js-ipld-dag-cbor
js-ipld-resolver
js-ipld-dag-pb
js-ipld-eth-block

libp2p

Name JSDOC Assignee
js-libp2p-spdy
 js-libp2p-webrtc-star
js-libp2p-floodsub
js-peer-info libp2p/js-peer-info#31  @dignifiedquire
js-peer-id libp2p/js-peer-id#41  @dignifiedquire
js-libp2p-crypto libp2p/js-libp2p-crypto#48 @dignifiedquire 
js-peer-book libp2p/js-peer-book#14 @dignifiedquire
 js-libp2p-secio
js-libp2p-websockets
js-libp2p-identify libp2p/js-libp2p-identify#22  @dignifiedquire
js-libp2p-tcp libp2p/js-libp2p-tcp#50 @dignifiedquire

multiformats

Name JSDOC Assignee URL  Shipped
js-multiaddr multiformats/js-multiaddr#31  @victorbjelkholm https://multiformats.github.io/js-multiaddr/
js-multibase multiformats/js-multibase#9 @dignifiedquire https://multiformats.github.io/js-multibase/
 js-multistream-select multiformats/js-multistream-select#28 @dignifiedquire https://multiformats.github.io/js-multistream-select/
 js-multihashing-async multiformats/js-multihashing-async#5  @dignifiedquire https://multiformats.github.io/js-multihashing-async/
 js-multicodec multiformats/js-multicodec#9 @dignifiedquire https://multiformats.github.io/js-multicodec/
 js-multihash multiformats/js-multihash#23 @dignifiedquire https://multiformats.github.io/js-multihash/

Other work

@dignifiedquire dignifiedquire added enhancement help wanted Seeking public contribution on this issue labels Nov 22, 2016
@victorb
Copy link
Member

victorb commented Nov 22, 2016

Thanks @dignifiedquire! I would love to help out with either js-ipfs-api or js-ipfs! 🤗 Also, I can probably tackle js-multiaddr

@dignifiedquire
Copy link
Member Author

@victorb
Copy link
Member

victorb commented Dec 5, 2016

@dignifiedquire we should probably add a link to the repository in the top right or something like that in the theme as well

@dignifiedquire
Copy link
Member Author

@dignifiedquire we should probably add a link to the repository in the top right or something like that in the theme as well

Yes, but need to implement that first in documentation.js, ref documentationjs/documentation#612

@dignifiedquire
Copy link
Member Author

@victorbjelkholm I take that back, added it :)

@dignifiedquire
Copy link
Member Author

@victorbjelkholm @diasdavid just created ipfs/aegir#78

@dignifiedquire
Copy link
Member Author

dignifiedquire commented Dec 7, 2016

Additional todos for (not needed for initial release though)

  • Add @enum support to documentation.js
  • Improve @memberof and @namespace handling for documentation.js
  • Figure out a way to display and handle nested definitions in documentation.js + clean-documentation-theme

@daviddias
Copy link
Member

@dignifiedquire this is shaping to be awesome! ❤️

I believe to make this a perfect landing, we just need to make sure that a) feedback is requested, b) feedback is collected.

Let's focus on getting js-ipfs and js-ipfs-api done first as those will be the most used doc pages.

@daviddias daviddias added status/ready Ready to be worked and removed status/in-progress In progress labels Jan 19, 2017
@RichardLitt
Copy link
Member

compile both a markdown version and a html version of the docs (markdown should be available in the README

I would very much like this. I'm not too happy with the API section just being a link to somewhere off-site; that means that the documentation is not close to the code. @dignifiedquire Can I help with this? Is there a ticket tracking this, elsewhere?

@dignifiedquire
Copy link
Member Author

that means that the documentation is not close to the code

the documentation is right in the code, so it's even closer now :P

@daviddias
Copy link
Member

@dignifiedquire I believe that is not a valid answer. Can you provide @RichardLitt with:

  • How to use jsdoc to generate markdown docs
  • Any thoughts you might have to make that a simple thing?

@dignifiedquire
Copy link
Member Author

I'm sorry I just don't agree with the notion of stuffing the readme full of api documentation if we don't have to. Especially for projects where the documentation is more than just a couple of methods. Putting it in a separate markdown file which is not tracked in git and published to npm I think makes sense though.

@RichardLitt
Copy link
Member

I'm sorry I just don't agree with the notion of stuffing the readme full of api documentation if we don't have to.

Fair.

Putting it in a separate markdown file which is not tracked in git and published to npm I think makes sense though.

Why no git track?

@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed status/ready Ready to be worked labels Jan 29, 2017
@dignifiedquire
Copy link
Member Author

Why no git track?

Because it's auto generated and the risk of things getting out of sync on a per commit basis is very high.

RichardLitt added a commit to ipfs/community that referenced this issue Feb 7, 2017
This references the Awesome Documentation effort. See ipfs/js-ipfs#615
RichardLitt added a commit to ipfs/community that referenced this issue Feb 10, 2017
This references the Awesome Documentation effort. See ipfs/js-ipfs#615
@daviddias daviddias added status/ready Ready to be worked and removed status/deferred Conscious decision to pause or backlog labels Apr 5, 2017
@jefft0
Copy link

jefft0 commented May 26, 2017

For awesome documentation, each example link should be pinned somewhere so that the reader can try the example. E.g. the example for "This is some data" on the examples page doesn't resolve:

https://ipfs.io/ipfs/QmNZiPk974vDsPmQii3YbrMKfi12KTSNM7XMiYyiea4VYZ/example#/ipfs/QmRFTtbyEp3UaT67ByYW299Suw7HKKnWK6NJMdNFzDjYdX/data/readme.md

Also, the links for the example web site on this page don't work:

https://ipfs.io/ipfs/QmNZiPk974vDsPmQii3YbrMKfi12KTSNM7XMiYyiea4VYZ/example#/ipfs/QmRFTtbyEp3UaT67ByYW299Suw7HKKnWK6NJMdNFzDjYdX/websites/README.md

@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed status/ready Ready to be worked labels Jun 20, 2017
@daviddias
Copy link
Member

Moved the entire tracking of this awesome endeavour to its own PR - #651

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awesome endeavour help wanted Seeking public contribution on this issue
Projects
None yet
Development

No branches or pull requests

6 participants