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
Local file path stored in docs #642
Comments
|
Actually, that didn't fix it. On the local copy of the generated docs, whole offending sections of the documentation are no longer visible. Once it was published, all of those sections are now visible and of course have It's still unclear how to prevent it from pulling in those external links. |
We have the same problem. Would be great if this could be fixed at some point. An easy workaround would be to not provide a |
Working on a team project with this issue is a huge annoyance. All |
Currently having this issue myself. I can't believe this has been an open issue for 2 years. Any word on this? |
Could someone experiencing this provide a repo + doc generation script that reproduces the issue? I have been unable to reproduce this on the TypeDoc repo. |
For me, the issue is presenting itself when I run TypeDoc on a project containing a class that inherits from some class provided by an external library. The "Defined in..." section of all the inherited members on that class display the local file paths to the external library. Specifically, they're pointing to the I was able to work around the issue for the current specific project I'm working on by not extending But I know I'm also planning on writing another library module in this set of separate modules once I conclude this current module and it will have to explicitly inherit from an external library so this problem will present itself once again. |
I whipped up a quick repo where the issue is definitely occurring. https://github.com/zajrik/typedoc-test You can see in <aside class="tsd-sources">
<p>Inherited from Error.message</p>
<ul>
<li>Defined in D:/Code Stuff/node-projects/sambo/docs-test/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:974</li>
</ul>
</aside> This result can be reproduced with Is there something we're missing to allow us to exclude local file paths in the output? I don't mind having inherited members listed. I just don't want my filesystem information inserted into the documentation. Even if it's not necessarily compromising in any way, I just don't care to see it on there, especially since it provides no useful information for those without any way to actually see the file it points to. |
Thanks! This should definitely be fixable, not sure what's causing it yet, but I'll look into it. |
Awesome! Glad I could help. If you need anything else let me know. I'd really like to be able to use TypeDoc in the end for my multi-module project. Using JSDoc on the transpiled JS in my last big project really just isn't cutting it for me anymore. It's too clunky and I had to hack extra features into JSDoc and the theme I'm using just to satisfy how I wanted the documentation to be. TypeDoc provides all of the changes I made to JSDoc with the added benefit of supporting TS out of the box so no extra steps. |
Well, that was an... interesting debugging session. Apparently just using Why? I have no idea. The issue is that all the code for a project generally lives under |
For anyone who would like to just remove the "Defined in" sections when no url is known (which catches this case), you can create a custom theme with just this change:
This isn't a perfect solution, as we probably shouldn't be outputting full paths in the JSON output, but for anyone just using the HTML output, it should work until we come up with the right solution. |
That solution may indeed be decent enough for one of my two plans, which is having each module's documentation link to the other modules while still using TypeDoc to generate the sites. The other plan I had was to write my own documentation site that can load the documentation json from all modules of my project and display the documentation in one place. I'm less inclined to go with the latter because front-end is not my forte at all. I'd argue it's not worthy of being called a part of my skillset. I'll definitely be keeping my eye on the progress here. Thank you again for looking into it. |
This has been fixed in 0.15.2, just using the fix I mentioned above. I'm still not convinced it is the best solution, but it is at least consistent with how TypeDoc behaves with other paths. |
Oh cool. I was actually just about to add this to my modified fork of the default themes so this saves me the trouble. Thank you! |
If anyone else is having trouble with this: typedoc seems to infer the relative path based on where it was installed, so installing it globally can result in local file paths being relative to the common base path (typically your home directory). |
Another alternative solution - as of 0.17, there is the |
Sure but that's more of a workaround than a solution as it will remove the file paths completely. I was trying to figure out why the paths were leaking information about my environment rather than just the code base. |
I can confirm @pluma's suggestion. Installing typedoc locally in the project dir solved the issue |
I'm using the following configuration for my project:
And I'm running TypeDoc (v0.9.0):
typedoc --options typedoc.json --out docs src/lib
.My output documentation results in references to modules in
node_modules
with the path stored in the documentation itself. In other words, I'll end up with lines like this:I've tried using the
externalPattern
set to./node_modules/**/*
andexcludeExternal
, but it ends up excluding my entire module (i.e., the documentation is just an index file with my readme in it).What is the correct configuration to prevent references to my local filesystem ending up in my published documentation?
The text was updated successfully, but these errors were encountered: