Skip to content

Add docs on removing edit button #3479

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

Merged
merged 2 commits into from
Feb 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/guides/remove-edit-buttons.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Removing "Edit on ..." Buttons from Documentation
=================================================

When building your documentation, Read the Docs automatically adds buttons at
the top of your documentation that point readers to your repository to make
changes. For instance, if your repository is on GitHub, a button that says "Edit
on GitHub" is added to your documentation to make it easy for readers to author
new changes.

The only way to remove these links currently is to override the Read the Docs
theme templates:

* In your Sphinx project path, add a path called ``_templates``. If you use a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"add a path" sounds weird to me. I'd say that I prefer "create a folder" or "make a directory" or similar.

different ``templates_path`` option in your ``conf.py``, substitute that path.
* Create a file in this path called ``breadcrumbs.html``

The new ``breadcrumbs.html`` should look like this::

{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}

{% block breadcrumbs_aside %}
{% endblock %}

Now when you build your documentation, your documentation won't include an edit
button or links to the page source.