Skip to content

Way to hide "defined in" #999

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

Closed
1 task done
fc opened this issue Mar 28, 2019 · 4 comments
Closed
1 task done

Way to hide "defined in" #999

fc opened this issue Mar 28, 2019 · 4 comments

Comments

@fc
Copy link
Contributor

fc commented Mar 28, 2019

Problem

Currently it will generate a link to the source code. Here it is where it is in the templates:
https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/member.sources.hbs

I'm generating documentation for end users of a module but it's not necessary for them to have links back to our GitHub repos.

Suggested Solution

Add an option to typedoc like --hideSources that will hide it.

Currently it is possible create a fork of the template to hide it if it's really needed.

@aciccarello
Copy link
Collaborator

I wonder if you can use this plugin to unset the URL. The template is able to handle missing URLs.

https://github.com/gdelmas/typedoc-plugin-sourcefile-url

@fc
Copy link
Contributor Author

fc commented Mar 29, 2019

Thank you!

While it still has the link, it at least removes the URL to the GitHub repos. It's an imperfect solution but without wanting to maintain a fork of a template it is acceptable for right now. It may also be possible to achieve it by submitting a PR to that plugin.

This is the sourcefile-map.json I used - the replace value must be a string but an empty string tries to link to still link to the GH page. Using a hash tag it won't try to load anything although the link is still clickable.

[
  {
    "pattern": "^.*$",
    "replace": "#"
  }
]

@fc fc closed this as completed Mar 29, 2019
@domske
Copy link

domske commented Apr 12, 2019

Please reopen and add a official option to hide defined in <link>.

@rhuitl
Copy link

rhuitl commented Jul 29, 2020

Yes please do... we have to customize the theme only for this reason, and now found that we got broken search because we forgot to update the theme when updating Typedoc...

Update: we found the option disableSources. It hides the "defined in" section.

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

No branches or pull requests

4 participants