Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

[Needs Review] Auto Generated Swagger docs and new docs site on Github Pages #404

Merged
merged 1 commit into from
Jul 31, 2017
Merged

Conversation

darahayes
Copy link
Contributor

@darahayes darahayes commented Jul 21, 2017

This PR does a number of things,

  1. docs/udaru-swagger-site is checked into source control. So the site generated by the newly added npm run swagger-gen is now saved in the repo.

  2. A new script - scripts/deploy-gh-pages.sh This script is run during a travis build. It regenerates the swagger docs and if there are any changes, they are committed and pushed to master.

  3. Some changes in the .travis.yml file to run the new script. This new config takes advantage of a new feature in travis called build stages. This allows us to run that publish script once only after the two separate builds for node 6 and node 7 are run.

  4. Proposed Docs site - darahayes.github.io/udaru. Github Pages allows us host a docs site within the docs folder of the master branch. We already have a docs folder in the Udaru repo so I used a tool called docsify to turn our docs folder into that docs site in the link.

docsify some really nice features:

  • There is no build process. It's essentially a SPA that renders the actual markdown files on the fly. Take a look at the docs/index.html file included in this PR.
  • Navigation/Structure is incredibly simple. The sidebar you see in that demo site is defined using a single markdown file docs/_sidebar.md
  • Super low effort and low investment - That site was made possible with a single html file and a markdown file (sidebar). Nothing else in the repo had to change to accommodate this. It also means we can get rid of it really easily if we want.

And btw you can go into the demo website here darahayes.github.io/udaru and then click the link in the sidebar to get the Swagger Docs.

I know there's going to be a big overhaul with the docs but I think this could really help.

Please let me know what you think.

@coveralls
Copy link

coveralls commented Jul 21, 2017

Coverage Status

Coverage remained the same at 96.253% when pulling 6b6af6e on darahayes:master into 87a5c61 on nearform:master.

@nearform nearform deleted a comment from coveralls Jul 21, 2017
@nearform nearform deleted a comment from coveralls Jul 21, 2017
@nearform nearform deleted a comment from coveralls Jul 21, 2017
Copy link
Contributor

@dberesford dberesford left a comment

Choose a reason for hiding this comment

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

This is really great step forward Dara, good job! I really like docsify, and also great there will be a ghpages for Udaru. I think we need to work on the documentation itself, and also on the swagger output, it doesn't really suit a static site (e.g. removing the 'Try it out' buttons), but overall this gives us a really solid foundation to make those changes from here.

docs/_sidebar.md Outdated
@@ -0,0 +1,11 @@
- Guides
- [Udaru Overview](overview.md)
- [Authorization Introduction](authorization-introduction.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed. This file has been replaced by overview.md and I forgot to remove it in my last PR. Note PR to remove it here: #405

docs/index.html Outdated
<html lang="en">
<head>
<meta charset="UTF-8">
<title>udaru - A policy based authorization module</title>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change to 'Udaru - the Platform Authorization Service'

@coveralls
Copy link

coveralls commented Jul 24, 2017

Coverage Status

Coverage remained the same at 96.253% when pulling 321d86b on darahayes:master into 87a5c61 on nearform:master.

@darahayes
Copy link
Contributor Author

@dberesford I fully agree. The content of the docs really needs to be improved. I think before it was hard to know even where to begin but the little docsify site really helps us visualise the docs and gives us some structure to help make those decisions. Now we're in a great place to start improving.

I've made your changes as requested.

@coveralls
Copy link

coveralls commented Jul 24, 2017

Coverage Status

Coverage remained the same at 96.253% when pulling 99e3149 on darahayes:master into 87a5c61 on nearform:master.

@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage remained the same at 96.253% when pulling 321d86b on darahayes:master into 87a5c61 on nearform:master.

@dberesford dberesford merged commit 04ea7c3 into nearform:master Jul 31, 2017
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.

3 participants