From 87d58ceb0f7e8d040218b9a932c74a8a5aaef04a Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Mon, 26 Apr 2021 01:39:44 +0200 Subject: [PATCH] Add support for authors (outside of data) Allow the creation of a new category: the authors. The change patches the base theme to allow the usage of the author sidebar which comes from minimal-mistakes. That sidebar already supports authors added through the data files, but this new authors type will be managed through separate files instead (thanks to Netlify CMS). --- _includes/author-profile.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_includes/author-profile.html b/_includes/author-profile.html index bd560f7..8dc59fe 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -1,5 +1,9 @@ {% assign author = page.author | default: page.authors[0] | default: site.author %} +{% if site.authors|where:"title",author|first %} +{% assign author = site.authors|where:"title",author|first %} +{% else %} {% assign author = site.data.authors[author] | default: author %} +{% endif %}