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

Add docs website and improve the docs #411

Closed
AoDev opened this issue Apr 21, 2020 · 12 comments · Fixed by #875
Closed

Add docs website and improve the docs #411

AoDev opened this issue Apr 21, 2020 · 12 comments · Fixed by #875
Assignees
Labels
documentation Improvements or additions to the documentation
Milestone

Comments

@AoDev
Copy link

AoDev commented Apr 21, 2020

Is your feature request related to a problem? Please describe.
Sometimes it's hard for me to find the documentation for something in particular, although the information is there.

Describe the solution you'd like
I'd like to create better docs for the lightweight-charts.

My plan is to use Docusaurus to build the docs. I already use it for another project so it should be relatively easy to setup docs for this library. Markdown can be used, so we can just copy paste current docs as a first step.

Before I begin I thought it would be better to share this idea with you, to know whether you want to do this together or not, have some thoughts or constraints.

On my side, I can do it alone and completely standalone, but docs could be in this repo too. Let me know. : )

@timocov
Copy link
Contributor

timocov commented Apr 21, 2020

Some time ago I also looked at some "static site generators" to get site with the docs, but afaik there was some issues.

I think we need to solve (at least) the following questions:

  1. Deploy. Where the site will be deployed? Will it be github pages or something else? If so, who and how the deploy will be triggered? Afaik they could be deployed from specific branch only or from specific folder.
  2. Versioning. The site should support versioning for the lightweight-charts versions so users should be able to easily switch between package versions.
  3. Search. If I remember correctly, Docusaurus supports it, but anyway we need to say it :) - it should support search (in any way via custom tool or internally).
  4. API reference. If it's possible, support to kind of import (inject/add) API reference. It could be generated from typescript declaration file we provide via typedoc, so we need to manage it somehow.

I might miss something, so please let me know what do you think :)

@timocov timocov added documentation Improvements or additions to the documentation enhancement Feature requests, and general improvements. labels Apr 21, 2020
@AoDev
Copy link
Author

AoDev commented Apr 21, 2020

I think we need to solve (at least) the following questions:

I don't know if Tradingview wants to maintain full control but I'll answer how I do it for my website.

  1. Deploy. Where the site will be deployed?

I use Netlify, it is especially good for statics sites. It has a CI/CD with (auto)deployment configs, that can be configured per branch. I can have the site on my account (it's free) unless you want to retain full control.

  1. Versioning. The site should support versioning for the lightweight-charts versions so users should be able to easily switch between package versions.

It seems to be supported out of the box if needed but I haven't tried it. Docusaurus versioning

  1. Search.

Is supported this way: https://docusaurus.io/docs/en/search#__docusaurus.

  1. API reference. If it's possible, support to kind of import (inject/add) API reference.

This is independent of Docusaurus. Maybe there are some modules out there that can generate api pages to markdown, then Docusaurus will pick them up. I personally don't use typescript much but I do use jsdocs a lot. A quick search on npm lead to modules like these: jsdoc-to-markdown so we could probably do something about it.

@timocov
Copy link
Contributor

timocov commented Apr 21, 2020

unless you want to retain full control.

I think it'd be better, so we can control full workflow and make changes if we need some, independently of someone outside (don't get me wrong please). I meant that, for example, if you'll on vacation and we need to make some changes, we'll unable to do so and will wait you some time. I just think that it'd better to have full control of the whole pipeline/state in one place.

I use Netlify, it is especially good for statics sites.

I've heard about that but never use it yet 👍. It's kind of now.sh and so on, right?

This is independent of Docusaurus. Maybe there are some modules out there that can generate api pages to markdown, then Docusaurus will pick them up.

Yeah, agree.

Am I correct that the whole Docusaurus' config, settings files, some headers/footers should be placed in the repo, right?

@AoDev
Copy link
Author

AoDev commented Apr 21, 2020

@timocov This library / project is mine bard-router and the docs are made with Docusaurus, if you want a better idea of how it looks like. Same setup, Netlify + Docusaurus.

The docs (docusaurus) are in documentation folder.

I just have a simple command in Netlify CI.
cd documentation/website; npm install; npm run build

Regarding your comment about the updates to the docs, it would not be a problem if I were not available because the deploy process is entirely through Git, you don't need to do anything with Netlify once configured. (That doesn't remove the fact that it's better if you have full control, just saying you wouldn't be blocked for docs updates)

If you want, I can build a prototype as it would be faster at the beginning, then I'll transfer everything to you. (I'd do this in my free time, so it's a best effort approach ;))

@timocov
Copy link
Contributor

timocov commented May 11, 2020

Hey @AoDev, sorry for really late reply.

I can build a prototype as it would be faster at the beginning, then I'll transfer everything to you. (I'd do this in my free time, so it's a best effort approach ;))

Yeah, let's do it 💪

@AoDev
Copy link
Author

AoDev commented May 11, 2020

Cool, I'll start : )

@AoDev
Copy link
Author

AoDev commented May 15, 2020

@timocov I've deployed a quick draft, so you can say if we go forward with this solution.

Things to take into account right now:

  • I have made some minor changes to help with the structure of the docs but I haven't changed the content.
  • The search is not implemented yet.
  • The images are broken but I will fix them if we continue.
  • There are a bunch of things / links that come from the initial boilerplate of Docusaurus to remove later.

To me it looks much easier to find information already.
https://lightweight-charts-docs.netlify.app/

@AoDev
Copy link
Author

AoDev commented May 18, 2020

Search has been added.

@timocov
Copy link
Contributor

timocov commented May 19, 2020

@AoDev Looks good! 👍 I guess we need to adopt our docs a bit to make "readable" and "searchable", but anyway it's other question though.

@AoDev
Copy link
Author

AoDev commented May 19, 2020

@timocov Yep, I'll do the setup then you will be able to configure everything however you want.

How should we continue? I fix the images and make a PR with a bit of documentation about how it works?
For the hosting, do you / tradingview have decided something? If you go with Netlify then I can share the config.

@timocov
Copy link
Contributor

timocov commented May 25, 2020

I fix the images and make a PR with a bit of documentation about how it works?

Yeah, looks good for me 👍.

For the hosting, do you / tradingview have decided something? If you go with Netlify then I can share the config.

We didn't decide anything about that, so I think we can start from Netlify. I guess it shouldn't be hard to move to any other platform in the future, let's don't waste time on it now.

@timocov timocov mentioned this issue Nov 26, 2021
2 tasks
@timocov
Copy link
Contributor

timocov commented Nov 26, 2021

I believe this should be fixed in #875

@timocov timocov closed this as completed Nov 26, 2021
@timocov timocov added this to the 3.8 milestone Nov 26, 2021
@timocov timocov removed the enhancement Feature requests, and general improvements. label Jan 25, 2022
@timocov timocov changed the title Improving the docs Add docs website and iimprove the docs Jan 25, 2022
@timocov timocov changed the title Add docs website and iimprove the docs Add docs website and improve the docs Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants