Docs for hidding "On ..." section from versions menu#4547
Conversation
This is not a real solution, but currently is the only way of doing this.
|
Hmm. What exactly is the use case for hiding this? Is it broken, or people just don't want to promote the fact that their docs are on GitHub? Feels like the theme could include this CSS optionally based on the pre-existing GH edit link settings, as a somewhat similarly hacky solution, but more maintainable going forward. |
This is something more useful for the corporate site. The use case is when the documentation is
People just don't want them to show because the repo is private.
I didn't find any setting for hiding this links using a theme config (https://github.com/rtfd/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/theme.conf). Also, we do have a guide to overwrite the template and hide the top-right links also in a hacky way: https://docs.readthedocs.io/en/latest/guides/remove-edit-buttons.html If we are going to add a theme config we should manage both things with the same setting. On the other hand, I'm not sure I like to add this in the theme itself since this is more a Read the Docs thing because the theme doesn't generate/add the "On GitHub" link in the versions menu. It only adds "On Read the Docs": https://github.com/rtfd/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/versions.html#L23. The section "On GitHub" comes from the footer API call: https://github.com/rtfd/readthedocs.org/blob/07f024a9ea8af830c330ff96f40e634722a7b136/readthedocs/restapi/templates/restapi/footer.html#L79-L88 |
|
We have a setting for it, but I guess it isn't documented: https://github.com/rtfd/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/breadcrumbs.html#L40 The idea would be to have a |
|
I think this looks okay for now, it probably helps to just have something available. I agree we should have a better answer for this though. Merging for now, we can revisit with some better ideas later |
This is not a real solution, but currently this is the only way of doing this.
Related: #4544