From 789c5a0e736c56f2709a11205852aa454b5e72ab Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Fri, 3 Jun 2016 16:09:49 -0700 Subject: [PATCH] Allow users to override "Edit" links to GH/BB. This allows you to set a :github_url: or :bitbucket_url: in your file metadata and have it override the Edit URL. --- sphinx_rtd_theme/breadcrumbs.html | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/sphinx_rtd_theme/breadcrumbs.html b/sphinx_rtd_theme/breadcrumbs.html index 7c2ce5c8..2266d403 100644 --- a/sphinx_rtd_theme/breadcrumbs.html +++ b/sphinx_rtd_theme/breadcrumbs.html @@ -6,6 +6,14 @@ {% set suffix = source_suffix %} {% endif %} +{% if meta is defined and 'github_url' in meta %} +{% set display_github = True %} +{% endif %} + +{% if meta is defined and 'bitbucket_url' in meta %} +{% set display_bitbucket = True %} +{% endif %} +