Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Build markdown API docs for JS and Go packages #43

Merged
merged 1 commit into from
Dec 5, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Nov 17, 2017

This hacky little script builds API reference docs in markdown for a given JS or Go package. It's not wired up to the build yet since it depends on a change in aegir.

Examples:

> ./package.sh github.com/ipfs/js-ipfs-api master content/pkg/
> ./package.sh github.com/ipfs/go-ipfs-api master content/pkg/

These end up in content/pkg/{js,go}-ipfs-api where they're picked up by Hugo, which renders them at https://docsdev.ipfs.team/pkg/{js,go}-ipfs-api.

These currently both render godoc2md's and documentation.js's default markdown templates -- we can customize them as we see fit.

@ghost ghost self-assigned this Nov 17, 2017
@ghost ghost added the in progress label Nov 17, 2017
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though in future it would be nice to split this into sections a bit more.

BTW, there is https://github.com/ipfs/docs/tree/master/content/api directory for APIs

@magik6k
Copy link
Contributor

magik6k commented Nov 17, 2017

Oh, and for Go the links in index don't work

@ghost
Copy link
Author

ghost commented Nov 17, 2017

BTW, there is https://github.com/ipfs/docs/tree/master/content/api directory for APIs

We should have much more package docs than just js-ipfs-api and go-ipfs-api though (these were just examples).

/api can hold the HTTP docs and concepts -- but yeah this just again hints at the huge confusion of terms that we've let grow over the years. When we say API, wtf do we actually mean? Core API, HTTP API, :5001, the *-api packages? But that's for another discussion.

Oh, and for Go the links in index don't work

Yeah I noticed that too -- something to do with Hugo's markdown renderer. Something to fix in one of the next few PRs :)

@ghost
Copy link
Author

ghost commented Nov 17, 2017

though in future it would be nice to split this into sections a bit more.

We can do that later. I think we shouldn't start with an empty structure skeleton and then fill it with content -- we should do it the other way around: develop structure as we add content

@ghost ghost force-pushed the feat/pkg-md branch from 320198c to f522df8 Compare November 24, 2017 00:35
@kyledrake kyledrake merged commit 01ca219 into master Dec 5, 2017
@ghost ghost removed the in progress label Dec 5, 2017
@ghost ghost deleted the feat/pkg-md branch December 5, 2017 16:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants