From 6c78a57c8c9c1c3b2ff51d203996a3d1fdfc7c1d Mon Sep 17 00:00:00 2001 From: Shahar Best Date: Wed, 31 Aug 2022 16:37:22 +0300 Subject: [PATCH] move contributor to partial file (#869) --- layouts/_default/single.html | 26 +------------------------- layouts/partials/contributor.html | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 layouts/partials/contributor.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 53f64c5..9b22a5f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,30 +4,6 @@ {{ .Content }} -{{ $author := index .Site.Data.authors (.Params.author | default "default") }} -{{- if $author -}} -

Contributor(s)

- -{{- end -}} +{{ partial "contributor.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/partials/contributor.html b/layouts/partials/contributor.html new file mode 100644 index 0000000..25c14bc --- /dev/null +++ b/layouts/partials/contributor.html @@ -0,0 +1,25 @@ +{{ $author := index .Site.Data.authors (.Params.author | default "default") }} +{{- if $author -}} +

Contributor(s)

+ +{{- end -}} \ No newline at end of file