From 481cc8303df572eb89c3f4052436386279cf2731 Mon Sep 17 00:00:00 2001 From: antazoey Date: Mon, 8 Jan 2024 12:25:34 -0600 Subject: [PATCH] docs: "Edit on GitHub" button (#1831) --- docs/_templates/layout.html | 6 ++++++ docs/conf.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 36b396935b..b99c55a557 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -255,5 +255,11 @@ {%- block footer %} {% endblock %} + {% if display_github %} +
  • + Show on GitHub
  • + {% endif %} + diff --git a/docs/conf.py b/docs/conf.py index f891bff466..f48983bb1c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -120,4 +120,9 @@ def setup(app): html_context = { "fixpath": fixpath, "get_versions": get_versions, + "display_github": True, + "github_user": "ApeWorX", + "github_repo": "ape", + "github_version": "main", + "conf_py_path": "/docs/", }