2014-07-31 09:37:41 -04:00
---
2016-02-24 16:12:21 -05:00
title: "Template: Author Override"
2016-03-06 22:32:01 -05:00
author: Billy Rick
2014-07-31 09:37:41 -04:00
excerpt: "A post to test author overrides using a data file."
---
2016-03-07 09:51:50 -05:00
2014-08-08 15:45:24 -04:00
For those of you who may have content written by multiple authors on your site you can now assign different authors to each post if desired.
2014-07-31 09:37:41 -04:00
2014-08-08 15:45:24 -04:00
Previously the theme used a global author for the entire site and those attributes would be used in all bylines, social networking links, Twitter Card attribution, and Google Authorship. These `owner` variables were defined in `config.yml`
2014-07-31 09:37:41 -04:00
2014-08-08 15:45:24 -04:00
Start by modifying or creating a new `authors.yml` file in the `_data` folder and add your authors using the following format.
2014-07-31 09:37:41 -04:00
{% highlight yaml %}
2016-02-24 16:12:21 -05:00
# /_data/authors.yml
2014-07-31 09:37:41 -04:00
2016-03-06 22:32:01 -05:00
Billy Rick:
2014-07-31 09:37:41 -04:00
name: Billy Rick
2016-03-06 22:32:01 -05:00
uri: http://thewhip.com
2014-07-31 09:37:41 -04:00
email: billy@rick .com
bio: "What do you want, jewels? I am a very extravagant man."
2014-08-08 15:45:24 -04:00
avatar: bio-photo-2.jpg
2014-07-31 09:37:41 -04:00
twitter: extravagantman
2016-03-06 22:32:01 -05:00
Cornelius Fiddlebone:
2014-07-31 09:37:41 -04:00
name: Cornelius Fiddlebone
email: cornelius@thewhip .com
bio: "I ordered what?"
avatar: bio-photo.jpg
twitter: rhymeswithsackit
{% endhighlight %}
2014-08-08 15:45:24 -04:00
To assign Billy Rick as an author for our post. You'd add the following YAML front matter to a post:
2014-07-31 09:37:41 -04:00
{% highlight yaml %}
2016-03-06 22:32:01 -05:00
author: Billy Rick
2015-04-17 11:43:36 +01:00
{% endhighlight %}