-
Notifications
You must be signed in to change notification settings - Fork 711
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
Show source button #26
Comments
I've seen some doc tools that copy over the source code to the documentation, while others like TypeDoc don't do this. I'm personally not a big fan of this as it seems to me some kind of illogical to ship the source code with the documentation, but I'm pretty sure there are more guys who think like you. I would like to focus on the new template and your other issues before starting on this one, so please give me some time before investigating this one. |
As long as I know github (maybe other hubs do as well) supports highlighting part of the file. typedoc could generate automatic link to github published repository. In that case no copying is necessary. Of course this feature should be optional. |
Clever. I like this idea! |
I've added support for automatic GitHub discovery with this commit. If TypeDoc detects a GitHub repository, the file names in the documentation are linked to the related GitHub pages. |
It somehow doesn't work for me. I guess your pattern for matching urls is not valid in my case.
I'm hosting it at http://evgenus.github.io/bigint-typescript-definitions/ |
Hmpf, I actually tested it against your repository but I did not take HTTP urls into concern. I've changed the regular expression for detecting GitHup repositories to this one:
|
Why is your url not ending on |
I don't know. Somehow it works that way too. I'm using SourceTree to manage my repositories. |
Okay, haven't been aware of this either. But I think we can just hardcode this one...
|
now it works. thanks |
Cool! I really like this new feature, I've already used it on TypeDoc and it is a great improvement. Thank you very much for this idea! By the way, did you try |
Minimal theme is even better for single module projects (and for definitions as well), because it leads directly into documentation. I will use it from now on. Default theme have a bit confusing main page. I guess you can close this issue. |
About github url. I've recently mentioned that a lot of people taking this as a problem. Check out this list https://www.npmjs.org/search?q=github%20url . |
Interesting, thanks for sharing this. I've looked over the first modules but they don't seem to do what we need. Anyway, as the current solutions seems to work lets stick to that one. If any other problems arise, I'll check back on those modules. As you suggested, I'll close this issue. The feature will be available with the next release. |
Is there a way to force the documentation links to use i.e. master instead of the commit-id? The thing is that this means that for every github commit-change I have to include the docs in the commit too, even if all the docs are otherwise identical. For example, this link: https://github.com/IntelliSearch/search-client/blob/f912698/src/AllCategories/AllCategories.ts#L19 Actually, right now, the above But, this link using master works fine: https://github.com/IntelliSearch/search-client/blob/master/src/AllCategories/AllCategories.ts#L19 So, all I am asking is if there is a way to tell the typedoc generator to use the branch name instead of the commit when generating the paths? |
Maybe it is not common case but I'd like to have ability of switching from documentation to source. Like this project do http://www.xperiments.io/TSDoc/docs/index.html
The text was updated successfully, but these errors were encountered: