From 768ec1dce349fe4708f6ad68be1ebb3f3dabafa1 Mon Sep 17 00:00:00 2001 From: driazati <9407960+driazati@users.noreply.github.com> Date: Mon, 24 Oct 2022 17:36:08 -0700 Subject: [PATCH] Add hook for changing 'Edit on GitHub' links (#10) These links are fine by default for normal `.rst` pages, but for sphinx gallery pages the link ends up being the `.rst` that was generated from the original `.py`. This adds a hook function that TVM can specify in its `docs/conf.py` to change the URLs to match the repo structure (in this case a 1 line regex replace) --- tlcpack_sphinx_addon/_templates/breadcrumbs.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tlcpack_sphinx_addon/_templates/breadcrumbs.html b/tlcpack_sphinx_addon/_templates/breadcrumbs.html index 0ff6b24..35f1e3e 100644 --- a/tlcpack_sphinx_addon/_templates/breadcrumbs.html +++ b/tlcpack_sphinx_addon/_templates/breadcrumbs.html @@ -44,6 +44,12 @@ {% endfor %}