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 npm package version to the documentation #544

Closed
madoar opened this issue Jun 30, 2017 · 5 comments · Fixed by #1155
Closed

Add npm package version to the documentation #544

madoar opened this issue Jun 30, 2017 · 5 comments · Fixed by #1155
Labels
enhancement Improved functionality

Comments

@madoar
Copy link

madoar commented Jun 30, 2017

I would like to add the version of the library which I'm writing to its documentation, so that an user can easily see if the documentation, that he's currently viewing belongs to the version of the library he's currently using.

Therefore the question: Is it currently possible to add the version of the library, for which you're creating a documentation, to the documentation itself?
If yes, how can this be done? Otherwise is it planned to add such a feature?

@aciccarello aciccarello added the enhancement Improved functionality label Jun 30, 2017
@aciccarello
Copy link
Collaborator

@madoar To my knowledge there is no current feature for this but it sounds like a great idea. As always, PRs are welcome.

@madoar
Copy link
Author

madoar commented Jun 30, 2017

I'm not really into the typedoc codebase.
Can you point me in the right direction, what would need to be done to show the version number, of the library of the documentation, inside the documentation?

@domske
Copy link

domske commented Nov 23, 2019

Any updates on this? (Maybe stale issue.) A workaround could be to require the package.json in the config.js of typedoc and put the version string to the name option. This requires the config file as JavaScript instead of JSON. Or manipulate the typedoc.json by a script to rewrite the name option. Or you can pass the name option with the dynamic name. But the best way is to add native support for this.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 2, 2019

This hasn't been worked yet, it seems like a good idea though. It seems reasonable to me to change the default name to include the version from package.json, users can always pass in a static name to remove the version if it isn't desired.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 26, 2019

Released in v0.15.6 - TypeDoc now defaults to using the package name and version to construct the name displayed in the documentation. If you just want the package name, you can pass --name <name> when generating the docs.

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

Successfully merging a pull request may close this issue.

4 participants