Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation and respective framework #39

Closed
arsdehnel opened this issue Feb 4, 2018 · 30 comments
Closed

Documentation and respective framework #39

arsdehnel opened this issue Feb 4, 2018 · 30 comments
Milestone

Comments

@arsdehnel
Copy link
Contributor

Wondering if there has been any consideration around more of a framework for documentation rather than just readme files? I don't necessarily have a strong opinion on what tool might make sense, just wanted to see if there were any thoughts/plans/starters for it. To me a key to a successful tool is a good set of docs. I wouldn't suggest there would need to be everything documented in the framework right from the beginning but getting something setup so it's easy to add things as folks have time/desire would be nice.

@jdalrymple
Copy link
Owner

This would be awesome. I have put some thought into it, but haven't had the time to get it all setup. I'll try and document the plans asap

@arsdehnel
Copy link
Contributor Author

Cool. I don’t have a ton of time but would be interested in maybe helping out with that.

@Marethyu1
Copy link
Contributor

I would potentially be interested in this too!

@jdalrymple
Copy link
Owner

jdalrymple commented Mar 20, 2018

Started looking into this. Thinking about using somehting similar to mkdocs or hugo. Will try and post up an example soon!

https://themes.gohugo.io/theme/kube/

@jdalrymple
Copy link
Owner

@Sharma-Rajat

@jdalrymple
Copy link
Owner

Beautiful docs, https://node-postgres.com/

@pablobirukov
Copy link
Contributor

pablobirukov commented May 14, 2018

Would you guys consider switching to typescript? If so, then I can help you to introduce it, add build step and annotate the codebase. That will somehow solve the problem of documentation. I believe most of the IDEs (WS and VS Code for sure) pick up type definitions and show autocomplete even in javascript project (I don't even mention type check for typescript projects).

If you are not interested in switching to typescript, I can try to come up with @types/node-gitlab package, but that way it's harder to update types as you make changes in the codebase itself

@pablobirukov
Copy link
Contributor

Also, there is https://github.com/TypeStrong/typedoc which makes it possible to generate the documentation, once you have added annotations to your code

@jdalrymple
Copy link
Owner

Cool!!! I thought about it initially, but had some trouble getting all the config stuff setup. I would def be interesting in trying it out though!

@jdalrymple
Copy link
Owner

https://docusaurus.io

@jdalrymple
Copy link
Owner

jdalrymple commented Jun 1, 2018

@diegoazh
Copy link

diegoazh commented Jul 4, 2018

Hello!, I'm recomend Vuepress for the documentation.
I would like to contribute with this but I don't know if this is in development now.

@jdalrymple
Copy link
Owner

Hey @diegoazh !! I was originally leaning to one of the two above options, but honestly all of them look pretty solid. If you'd like to build some docs in vuepress that would be great! Any reason you recommend vuepress over others?

@diegoazh
Copy link

Hi @jdalrymple, I recomend this tool for many reasons. It's simple, fast, markdown files, custom themes, service workers, google analytics, multilanguage support and all the power of VueJs inside of it.
It is new, I know, but it is very simple to use and it has a very fast development.

@jdalrymple
Copy link
Owner

yea then im game!

@jdalrymple jdalrymple changed the title documentation framework? Documentation and respective framework Sep 18, 2018
@jdalrymple jdalrymple added this to the 6.1.x milestone Jun 3, 2019
@jdalrymple jdalrymple modified the milestones: 6.x.x, 8.x.x, 7.x.x, 9.x.x Jul 2, 2019
@jdalrymple jdalrymple removed this from the 9.x.x milestone Jul 23, 2019
@arsdehnel
Copy link
Contributor Author

Ignore the DNS redirect, but I threw together the fastest site possible using typedoc: http://arsdehnel.github.io/node-gitlab.

Probably a lot of options out there and ways to even make typedoc better but thought I'd just throw something out there.

@jdalrymple
Copy link
Owner

Thats wicked! I've also threw a small one together using vue (See the PR above). Not sure what the best way forward would be. Anyone have any real preferences?

@arsdehnel
Copy link
Contributor Author

Is there a live rendering of that one? I missed that PR when scrolling through this issue otherwise might’ve just built that one and see how it is. I can pull it and build later when I’m back on my machine if it’s not published anywhere.

@arsdehnel
Copy link
Contributor Author

Not that it’s critical but do you know where this’ll end up publishing? GitHub pages seems like a fine starting point (or a home forever IMO) but are you thinking just under your namespace?

@arsdehnel
Copy link
Contributor Author

came across a *.js.org project just now while working on something else... maybe it would work to do gitlab.js.org?

https://js.org

@arsdehnel
Copy link
Contributor Author

Pulled down the vuepress branch and had a look. Did you write those .md files by hand or were they somehow generated? I'd hope for an automated method that uses typescript's annotations to build out docs such that there is no way to get the docs out of date with the code that it describes. That's the intent behind the typedoc setup that I played with and that seems really desirable IMO because nobody likes either a) writing jsdoc annotations in addition to typescript or b) having docs that don't match up with the actual code.

I don't have any weight in this discussion being a really limited contributor but I like the fact that typedoc is built for typescript and makes generation of docs super simple. I think we might hit limitations on their themes and control over templates (I have no experience here, just guessing) whereas something like vuepress is a full feature site generation tool that can be used to do anything we could dream up. But the ease of use/maintenance from the dev site is more important to me than feature rich site builder.

And to publish the docs (to answer my own question from above) I'd like to suggest we mirror this project onto gitlab.com (it is the GitLab API project after all) and use their GitLab Pages to host the site because their built-in CI processes can make the "publish docs" process much cleaner than GitHub's pages setup (IMO). And then I think we wire that gitlab pages site up to gitlab.js.org. But this is all just my opinion, I don't mean to come off as forceful or demanding, just throwing out a plan that makes sense in my head.

Given my use of this project I'd be happy to spend some time on making it better, albeit a pretty limited amount of time just do to life happening.

@jdalrymple
Copy link
Owner

Pulled down the vuepress branch and had a look. Did you write those .md files by hand or were they somehow generated? I'd hope for an automated method that uses typescript's annotations to build out docs such that there is no way to get the docs out of date with the code that it describes. That's the intent behind the typedoc setup that I played with and that seems really desirable IMO because nobody likes either a) writing jsdoc annotations in addition to typescript or b) having docs that don't match up with the actual code.

Yea they were manually written :'( but doing a quick search, we could use them in combination. Typedoc to generate the docs, and vuepress to display them. This can be done through this plugin: https://www.npmjs.com/package/typedoc-plugin-markdown.

This way we get the best of both!

And to publish the docs (to answer my own question from above) I'd like to suggest we mirror this project onto gitlab.com (it is the GitLab API project after all) and use their GitLab Pages to host the site because their built-in CI processes can make the "publish docs" process much cleaner than GitHub's pages setup (IMO). And then I think we wire that gitlab pages site up to gitlab.js.org. But this is all just my opinion, I don't mean to come off as forceful or demanding, just throwing out a plan that makes sense in my head.

I completely agree. I've been wanting to do this for a while, but didnt know the best way to keep everything in sync. Also would have to enforce only using one place for issue management (github or gitlab, though github may have a better reach right now)

@arsdehnel
Copy link
Contributor Author

Created #440 to discuss things around the mirroring, thinking that's related but not absolutely required to be a part of this discussion.

I added typedoc-plugin-markdown to my branch and it generated a bunch of markdown just fine. I have no idea what vuepress is looking for and how it would generate a menu of any sort but it does seem quite possible to wire these two up. Do we have anyone that knows vuepress enough to help get this started? Otherwise I can keep reading docs and trying stuff I guess :)

@jdalrymple
Copy link
Owner

Push it to a branch and ill give it a look later this weekend

@arsdehnel
Copy link
Contributor Author

Sorry, got sidetracked on another part of my project, I'll totally do this, just didn't get to it last week.

@arsdehnel
Copy link
Contributor Author

Updated my fork and created #448 that includes a couple commits. One for the package.json changes and one that has all the generated markdown (and a couple generated JSON files).

@arsdehnel
Copy link
Contributor Author

@jdalrymple with the rebranding you're working on do you have any plans around this documentation idea that has been rolling around? I can't figure out what the plan is here and so I sort of just left things as they were last fall. Feels like we need to decide if we want auto-generated docs included or if we're just wanting the "intro" stuff in a docs site and rely on vscode or other IDE to handle the specifics of the API. From there we can at least have a goal in mind on how the site should be put together and work from there.

@katariarajat
Copy link

@jdalrymple is there any documentation made anywhere for the above library describing methods with examples?

@jdalrymple
Copy link
Owner

@katariarajat Beyond the basic docs in the README, no. However, for an understanding on a particular function/method, feel free to look at the core source, the code is pretty straight forward, it also closely follows the GitLab v14 documentation (with exceptions currently being worked on in #2258 )

@jdalrymple
Copy link
Owner

Closing this for now, docs are quite low level, and with the typescript updates, should be pretty clear

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 a pull request may close this issue.

6 participants