From 0f0a38b7699a2aef05a4428e3d8371869a59fdc1 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Thu, 4 Jan 2018 19:17:05 -0800 Subject: [PATCH 1/2] 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. --- docs/guides/remove-edit-buttons.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/guides/remove-edit-buttons.rst diff --git a/docs/guides/remove-edit-buttons.rst b/docs/guides/remove-edit-buttons.rst new file mode 100644 index 00000000000..49cb7f0abcb --- /dev/null +++ b/docs/guides/remove-edit-buttons.rst @@ -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 + 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. From dfe93f5a892e166046d94b5de2b7804b5bf0a781 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Tue, 23 Jan 2018 11:39:56 +0700 Subject: [PATCH 2/2] Update copy --- docs/guides/remove-edit-buttons.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/guides/remove-edit-buttons.rst b/docs/guides/remove-edit-buttons.rst index 49cb7f0abcb..4d22ff4a7cd 100644 --- a/docs/guides/remove-edit-buttons.rst +++ b/docs/guides/remove-edit-buttons.rst @@ -10,8 +10,9 @@ 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 - different ``templates_path`` option in your ``conf.py``, substitute that path. +* In your Sphinx project path, create a directory called ``_templates``. If you + use a different ``templates_path`` option in your ``conf.py``, substitute that + directory name. * Create a file in this path called ``breadcrumbs.html`` The new ``breadcrumbs.html`` should look like this::