From 9b98c7772560f4cd98faca6ef000cb141b1cc9ee Mon Sep 17 00:00:00 2001 From: Florian Haas <610707+fghaas@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:35:20 +0100 Subject: [PATCH] Only show authors' email addresses if so configured in git-authors (#6494) Honour the git-authors plugin's setting to render the authors' names as links pointing to their email address: * If the git-authors plugin is enabled and its show_email_address option is not set, or is set to true, render the author's name as a "mailto:" link. * If the git-authors plugin is enabled and its show_email_address option is set to false, render the author's name in plain text with no link. * If the git-authors plugin is not enabled (or not installed), don't show author information. --- material/templates/partials/source-file.html | 5 +++++ src/templates/partials/source-file.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/material/templates/partials/source-file.html b/material/templates/partials/source-file.html index ea24d77af..b98990191 100644 --- a/material/templates/partials/source-file.html +++ b/material/templates/partials/source-file.html @@ -18,6 +18,7 @@ {% endmacro %} {% macro render_authors(authors) %} + {% set git_authors = config.plugins.get("git-authors") %} {% if authors | length == 1 %} @@ -28,9 +29,13 @@ diff --git a/src/templates/partials/source-file.html b/src/templates/partials/source-file.html index d2de99c9c..b3ecfc218 100644 --- a/src/templates/partials/source-file.html +++ b/src/templates/partials/source-file.html @@ -44,6 +44,7 @@ {% macro render_authors(authors) %} + {% set git_authors = config.plugins.get("git-authors") %} {% if authors | length == 1 %} @@ -54,9 +55,13 @@