Hey @progrium,
First of all, thanks for this awesome project! I really like the idea and I think it makes up for a pretty awesome alternative to github pages for documentation! The fact that you don't need to manage a separate branch neither you need to resort to things like Jekyll or Middleman to have something more "advanced" (like layouts) has hit me pretty hard :)
So I was wondering how it could be improved and I came up with a few things that I'd like to know your thoughts before attempting my first ever Golang pull request :P
JSON metadata
This is related to the rest of the stuff described below and it is about having some sort of metadata bundled with the project. Maybe some viewdocs.json on the project root that gives viewdocs some insights about the project when building it.
"Tagged docs"
Well... you know.... things changes and a new feature might have been introduced on a version that also has a breaking change that prevents people from upgrading. If we keep displaying only the docs from the master branch it might end up getting some people into trouble.
My idea was to leverage GitHub's release api and build docs for specific versions. Something like http://<github-username>.viewdocs.io/<repository-name>/<version> and use latest as the version for the current master or we could require users to list all versions on the JSON manifest file in order to make things less "magical".
README fallback:
GitHub has the automatic page generator and for smaller projects I think a README is enough. So my idea was to have a fallback to rendering the README in case the docs folder is not found. There's still the issue of specifying a pre made layout and a Google Analytics tracking code but this information could also be kept on the JSON manifest :)
I'm not really sure if it would be possible to somehow automatically grab the pre made github templates but I'm fine with marking that "out of scope" :P
CHANGELOG.md support
I'm not 100% sold on this one yet but apart from the README fallback we might also have support for rendering changelogs in a nice looking page. I'm also fine with not having this feature, just wanted to know your thougts on it as it is something that has crossed my mind.
I hope you like the ideas or that at least it gives you some food for thought :)
Hey @progrium,
First of all, thanks for this awesome project! I really like the idea and I think it makes up for a pretty awesome alternative to github pages for documentation! The fact that you don't need to manage a separate branch neither you need to resort to things like Jekyll or Middleman to have something more "advanced" (like layouts) has hit me pretty hard :)
So I was wondering how it could be improved and I came up with a few things that I'd like to know your thoughts before attempting my first ever Golang pull request :P
JSON metadata
This is related to the rest of the stuff described below and it is about having some sort of metadata bundled with the project. Maybe some
viewdocs.jsonon the project root that givesviewdocssome insights about the project when building it."Tagged docs"
Well... you know.... things changes and a new feature might have been introduced on a version that also has a breaking change that prevents people from upgrading. If we keep displaying only the docs from the master branch it might end up getting some people into trouble.
My idea was to leverage GitHub's release api and build docs for specific versions. Something like
http://<github-username>.viewdocs.io/<repository-name>/<version>and uselatestas the version for the current master or we could require users to list all versions on the JSON manifest file in order to make things less "magical".README fallback:
GitHub has the automatic page generator and for smaller projects I think a README is enough. So my idea was to have a fallback to rendering the README in case the
docsfolder is not found. There's still the issue of specifying a pre made layout and a Google Analytics tracking code but this information could also be kept on the JSON manifest :)I'm not really sure if it would be possible to somehow automatically grab the pre made github templates but I'm fine with marking that "out of scope" :P
CHANGELOG.md support
I'm not 100% sold on this one yet but apart from the README fallback we might also have support for rendering changelogs in a nice looking page. I'm also fine with not having this feature, just wanted to know your thougts on it as it is something that has crossed my mind.
I hope you like the ideas or that at least it gives you some food for thought :)