fix(docs-infra): show "suggest edits" only for /guide and /tutorial dirs (#24378)

PR Close #24378
This commit is contained in:
Martin Sikora 2018-06-08 18:13:07 +02:00 committed by Misko Hevery
parent 9533cc9809
commit b89a7dd4a2
1 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,12 @@
{% import "githubLinks.html" as github -%}
{% set relativePath = doc.fileInfo.relativePath %}
{% if doc.title %}{$ ('# ' + doc.title.trim()) | marked $}{% endif %}
<div class="page-actions">
<a href="{$ github.githubEditHref(doc, versionInfo) $}" aria-label="Suggest Edits" title="Suggest Edits"><i class="material-icons" aria-hidden="true" role="img">mode_edit</i></a>
</div>
{% if 'guide/' in relativePath or 'tutorial/' in relativePath or 'docs.md' in relativePath %}
<div class="page-actions">
<a href="{$ github.githubEditHref(doc, versionInfo) $}" aria-label="Suggest Edits" title="Suggest Edits"><i class="material-icons" aria-hidden="true" role="img">mode_edit</i></a>
</div>
{% endif %}
<div class="content">
{$ doc.description | marked $}
</div>