Skip to content

Commit 98a5175

Browse files
authored
Add docs on removing edit button (#3479)
* Add docs on removing edit button We don't have a great option for this currently. It should be a theme option, but for now, here's the hack that removes all of the buttons. * Update copy
1 parent df8079a commit 98a5175

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/guides/remove-edit-buttons.rst

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Removing "Edit on ..." Buttons from Documentation
2+
=================================================
3+
4+
When building your documentation, Read the Docs automatically adds buttons at
5+
the top of your documentation that point readers to your repository to make
6+
changes. For instance, if your repository is on GitHub, a button that says "Edit
7+
on GitHub" is added to your documentation to make it easy for readers to author
8+
new changes.
9+
10+
The only way to remove these links currently is to override the Read the Docs
11+
theme templates:
12+
13+
* In your Sphinx project path, create a directory called ``_templates``. If you
14+
use a different ``templates_path`` option in your ``conf.py``, substitute that
15+
directory name.
16+
* Create a file in this path called ``breadcrumbs.html``
17+
18+
The new ``breadcrumbs.html`` should look like this::
19+
20+
{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}
21+
22+
{% block breadcrumbs_aside %}
23+
{% endblock %}
24+
25+
Now when you build your documentation, your documentation won't include an edit
26+
button or links to the page source.

0 commit comments

Comments
 (0)