Skip to content

Commit

Permalink
Add support for authors (outside of data)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
tosky committed Apr 25, 2021
1 parent 88e37f3 commit 87d58ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _includes/author-profile.html
Original file line number Diff line number Diff line change
@@ -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 %}

<div itemscope itemtype="http://schema.org/Person">

Expand Down

0 comments on commit 87d58ce

Please sign in to comment.