I'm trying to find out how to use the _template overrides option in Sphinx to override the default ReadTheDocs theme for hosting Sphinx documentation on http://readthedocs.org.
Specifically, I'm wanting to remove/hide the "Edit on Github" link shown in the upper right hand corner of this theme.
Any tips would be greatly appreciated! Thanks!
I've reviewed the documentation here: http://www.sphinx-doc.org/en/stable/templating.html, however, I'm stumped and really need some help.
Thank you!
Okay, I figured it out so I'll answer my own inquiry in hopes to assist others.
Assuming you're using the ReadTheDocs default theme this should work just fine.
breadcrumbs.html file (https://github.com/snide/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/breadcrumbs.html)breadcrumbs.html file to your Sphinx documentation folder in the _templates folder. If this directory doesn't yet exist you'll need to create it.
In your conf.py file locate your html_context section, if you do not already have this, you can create it. (Sample linked below).
html_context = {
"display_github": False, # Add 'Edit on Github' link instead of 'View page source'
"last_updated": True,
"commit": False,
}
Add the breadcrumbs.html file to your tracked files using Git
conf.py References
Edit on Github option is now removed.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With