Skip to content

Conversation

koddsson
Copy link
Member

Here's a PR for how I see the documentation being in the future. It seems that our documentation is kind of lost somewhere(?) and I thought I'd take a stab at making a super simple documentation framework.

  1. It's easy to lint for missing documentation (is there a documentation.md file in the endpoint folder?)
  2. Written in markdown so it's real easy to read and write (and renders well in github!)
  3. The whole "framework" is currently only 14 lines + 2 npm packages.

I figured I'd open this PR to keep my work out in the open and am interested in any feedback on stuff you really feel like should be in a documentation framework for us.

@koddsson
Copy link
Member Author

Here's how it's currently looking:

image

Obviously missing some stuff but I'm amazed at how much I was able to do with little CSS.

@kristjanmik
Copy link
Member

This looks great! Have you thought about how we should implement this as our main doc?

@koddsson
Copy link
Member Author

I was thinking about utilizing ghpages to deploy to Github Pages on each build.

@koddsson
Copy link
Member Author

I added all the docs that currently exists on docs.apis.is but there are some missing. Pretty sure I won't add them in this PR though.

I kind of want to merge this as is and make a header and footer in another PR as well as more tools to make writing docs even easier.

@koddsson koddsson changed the title [WIP] feat: generate documentation from markdown files feat: generate documentation from markdown files Oct 14, 2017
@MiniGod
Copy link
Member

MiniGod commented Oct 14, 2017

How flexible is this? Could it be possible to add some functionality to the docs in the future so it's not just a static page? Like doing real calls to the API to load responses. Possible to add a sidebar? I have no experience with marked so I'm just curious about what we can possibly turn this into in the future.

@koddsson
Copy link
Member Author

@MiniGod Sure! Since apis.is is CORS enabled we can just add some javascript to fetch the resources. Since the markdown standard allows arbitrary HTML we can basically do everything we want in the docs.

@MiniGod
Copy link
Member

MiniGod commented Oct 15, 2017

Randomly stumbled upon this in the settings:

image

We can host the docs page directly from /docs on master, if we want?
In contrast to gh-pages that you linked above, we would have to commit the built html to master 👎
At least we have the option you know. I didn't know it was possible.

@koddsson
Copy link
Member Author

Oh that's cool! Didn't know that was a option! So what gh-pages does is that it will build the page and then take the dist folder and commit that to the gh-pages branch. But this option looks good to me if we're cool with having the compiled HTML on the master branch.

@stale
Copy link

stale bot commented Dec 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 14, 2017
@koddsson
Copy link
Member Author

This hasn't gotten any comments in a while and since it's adding stuff and not removing anything I'm gonna move this forward and merge this after resolving the conflict.

@stale stale bot removed the wontfix label Dec 14, 2017
@koddsson
Copy link
Member Author

Not sure why the tests are loading the markdown files. Looking at that now.

@koddsson
Copy link
Member Author

I think the currency endpoint might need test fixtures, it seems to be breaking a from day to day making me think there are some time sensitive data being saved somehow. Not sure how it would fail the tests but I'm gonna keep 👀 on it.

@koddsson koddsson merged commit f3dc510 into apis-is:master Dec 14, 2017
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

Successfully merging this pull request may close these issues.

3 participants