1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 07:30:12 +01:00

Generate Edit button only if page.edit_url

This commit is contained in:
Roberto Jimenez Sanchez 2017-11-08 00:19:13 +01:00 committed by Martin Donath
parent 0f9a76f452
commit e472e2d0b1
2 changed files with 2 additions and 2 deletions

View File

@ -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 %}

View File

@ -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>