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

Keep different versions of documentations #737

Closed
vinz243 opened this issue Apr 2, 2018 · 5 comments
Closed

Keep different versions of documentations #737

vinz243 opened this issue Apr 2, 2018 · 5 comments
Labels
enhancement Improved functionality help wanted Contributions are especially encouraged

Comments

@vinz243
Copy link

vinz243 commented Apr 2, 2018

HI, It would be great if we could keep differents versions (either only majors or minors) of documentations in the same folder, and developers would be able to select the version they are using

Thanks

@aciccarello aciccarello added enhancement Improved functionality help wanted Contributions are especially encouraged labels Apr 2, 2018
@aciccarello
Copy link
Collaborator

@vinz243 This would be a great feature! How would you expect TypeDoc to know what versions to show/generate?

@vinz243
Copy link
Author

vinz243 commented Apr 2, 2018

I guess it could use tags to detect which version to generate docs for. However this would also means that the version would first need to be tagged, so this would not work except if the docs are on another branch (like gh-pages). Another solution would be like, tagging the newly generated docs as 'current', and the previously generated one using tags. There could be a CLI option too like --targetVersion 4.2.0 to select a version (then current and 4.2.0 would have same docs)

@balupton
Copy link

balupton commented Nov 16, 2018

We have https://github.com/bevry/awesome-travis/blob/master/scripts/surge.bash which deploys the repo for each commit, branch, and tag.

For instance, for https://github.com/bevry/editions you can see the docs for master at http://master.editions.bevry.surge.sh/docs/ or the docs for v1.3.4 at http://v1.3.4.editions.bevry.surge.sh/docs/ or even a specific commit at http://fadc5cbb4b99f727f95a32bd4fe813198917d003.editions.bevry.surge.sh/docs/

As it deploys the whole compiled repo, you can even grab specific files for a specific version like so: http://v2.1.0.editions.bevry.surge.sh/edition-browsers/index.js

I made a scaffolding tool to do all the setup automatically at https://github.com/bevry/boundation - which today I added typescript and typedoc support.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 30, 2019

Benjamin's solution is the best one here, while TypeDoc could theoretically support merging docs for different versions, it is a large amount of complexity for a fairly small benefit. Keeping separate versions yourself also provides the flexibility to decide when documentation should be updated.

@thislooksfun
Copy link

thislooksfun commented Mar 15, 2021

I just (mostly) solved this issue in my own workflow as documented here, complete with automatic symlinks to the latest versions. You can view it in action here. It's semi-specific to my use-case right now, but I could easily abstract it out to its own action if people would be interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

5 participants