Skip to content

Commit

Permalink
Docs: Hide the "Edit this page" button on the API reference pages (#5956
Browse files Browse the repository at this point in the history
)

These are automatically generated so the link is not real and will result in a 404.
  • Loading branch information
AhmedBasem20 authored Apr 11, 2023
1 parent 83adf68 commit 88d370c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@
</p>
</div>
</footer>
<script>
var editPagePath = document.querySelector("div.tocsection.editthispage a").href;
var pathSegments = editPagePath.split('/');
if (pathSegments.includes('apidoc') == true ) {
var editPageButton = document.querySelector("div.tocsection.editthispage");
editPageButton.style.display = "none";
}
</script>
{% endblock %}

0 comments on commit 88d370c

Please sign in to comment.