Skip to content

Commit

Permalink
Drop support for scalar 'author' configuration (jekyll#384)
Browse files Browse the repository at this point in the history
Merge pull request 384
  • Loading branch information
ashmaroli authored and jekyllbot committed Jan 22, 2020
1 parent e54ef80 commit b31d67d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,23 @@ If you don't want to display comments for a particular post you can disable them

:warning: `url`, e.g. `https://example.com`, must be set in you config file for Disqus to work.

### Author Metadata

From `Minima-3.0` onwards, `site.author` is expected to be a mapping of attributes instead of a simple scalar value:

```yaml
author:
name: John Smith
email: "[email protected]"
```
To migrate existing metadata, update your config file and any reference to the object in your layouts and includes as summarized below:
Minima 2.x | Minima 3.0
------------- | -------------------
`site.author` | `site.author.name`
`site.email` | `site.author.email`


### Social networks

Expand Down
7 changes: 4 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
title: Your awesome title
author: GitHub User
email: [email protected]
author:
name: GitHub User
email: [email protected]
description: > # this means to ignore newlines until "show_excerpts:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Expand Down Expand Up @@ -46,7 +47,7 @@ minima:
# instance: example.com
# - username: jekyll2
# instance: example.com

# If you want to link only specific pages in your header, uncomment
# this and add the path to the pages in order as they should show up
#header_pages:
Expand Down
10 changes: 6 additions & 4 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
<div class="footer-col-wrapper">
<div class="footer-col">
<h2 class="footer-heading">{{ site.title | escape }}</h2>
{%- if site.author %}
<ul class="contact-list">
{% if site.author -%}
<li class="p-name">{{ site.author | escape }}</li>
{% if site.author.name -%}
<li class="p-name">{{ site.author.name | escape }}</li>
{% endif -%}
{% if site.email -%}
<li><a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></li>
{% if site.author.email -%}
<li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
{%- endif %}
</ul>
{%- endif %}
</div>
<div class="footer-col">
<p>{{ site.description | escape }}</p>
Expand Down

0 comments on commit b31d67d

Please sign in to comment.