From e472e2d0b1f7b16d2269dcef6f26c0762f516fb2 Mon Sep 17 00:00:00 2001
From: Roberto Jimenez Sanchez <jszroberto@gmail.com>
Date: Wed, 8 Nov 2017 00:19:13 +0100
Subject: [PATCH] Generate Edit button only if page.edit_url

---
 material/base.html | 2 +-
 src/base.html      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/material/base.html b/material/base.html
index e438845a..0fe208b8 100644
--- a/material/base.html
+++ b/material/base.html
@@ -129,7 +129,7 @@
           <div class="md-content">
             <article class="md-content__inner md-typeset">
               {% block content %}
-                {% if config.edit_uri %}
+                {% if page.edit_url %}
                   <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
                 {% endif %}
                 {% if not "\x3ch1" in page.content %}
diff --git a/src/base.html b/src/base.html
index 7f3ed7b6..f743a530 100644
--- a/src/base.html
+++ b/src/base.html
@@ -242,7 +242,7 @@
               {% block content %}
 
                 <!-- Edit button, if URL was defined -->
-                {% if config.edit_uri %}
+                {% if page.edit_url %}
                   <a href="{{ page.edit_url }}"
                       title="{{ lang.t('edit.link.title') }}"
                       class="md-icon md-content__icon">&#xE3C9;<!-- edit --></a>
-- 
GitLab