Comments (15)
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.
from typedoc.
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.
from typedoc.
Clever. I like this idea!
from typedoc.
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.
from typedoc.
It somehow doesn't work for me. I guess your pattern for matching urls is not valid in my case.
$ git ls-remote --get-url
https://github.com/Evgenus/bigint-typescript-definitions
I'm hosting it at http://evgenus.github.io/bigint-typescript-definitions/
from typedoc.
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:
/github\.com[:\/]([^\/]+)\/(.*?)\.git/
from typedoc.
Why is your url not ending on .git
?
from typedoc.
I don't know. Somehow it works that way too. I'm using SourceTree to manage my repositories.
Try https://www.debuggex.com/ it helps me a lot with regexes.
from typedoc.
Okay, haven't been aware of this either. But I think we can just hardcode this one...
url = /github\.com[:\/]([^\/]+)\/(.*)/.exec(remotes[i]);
if (url) {
this.gitHubProject = url[2];
if (this.gitHubProject.substr(-4) == '.git') {
this.gitHubProject = this.gitHubProject.substr(0, this.gitHubProject.length - 4);
}
}
from typedoc.
now it works. thanks
from typedoc.
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 --theme minimal
?
from typedoc.
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.
from typedoc.
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 .
from typedoc.
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.
from typedoc.
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
depends on that commit to have been executed. Now, if I was hosting live docs for every version, then that would be fine. But, I am only hosting live docs for the latest version. Meaning that if the link instead was to master (which is my, and probably others' main branch too), then it would work and regenerating docs for newer commits could have the same results.
Actually, right now, the above blob/f912698/
link doesn't work as I dropped updating the source, since there were no changes. I since then realised that doing so meant that the links will not work.
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?
from typedoc.
Related Issues (20)
- @group descriptions HOT 3
- Interface and Class with same name leeds to endless loop HOT 2
- TypeDoc crashes during link resolver HOT 7
- Exporting a function named `html` provokes a 404 (`index.html.html`) HOT 5
- Q: How to document CallExpression/CallSignature with TypeDoc? HOT 5
- Module DeclarationReflections are missing readme property in --json output with --entryPointStrategy=packages
- How do I "place a child in a group"? HOT 1
- feat: sort unions HOT 2
- issues about #2479 HOT 6
- Is there a JavaScript API? HOT 13
- Use icon-font instead of svg in html outputs HOT 1
- How can I output the documentation as react components? HOT 1
- Maximum call stack size exceeded for complex type HOT 3
- `@interface` type references do not always link correctly. HOT 1
- Duplicate comment in interfaces and types HOT 3
- How to exclude a folder to not be parsed? HOT 1
- How to include one dependency while using --excludeExternals? HOT 2
- [BUG] Index is empty initially HOT 3
- [BUG] Weird behavior with h2 headers when no h1 is present
- How to include changelog.md in typedoc output? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typedoc.