Update docs

This commit is contained in:
Michael Rose
2016-04-08 21:49:50 -04:00
parent ff431ae28f
commit a79b31502a
9 changed files with 80 additions and 19 deletions

View File

@ -4,33 +4,35 @@ author: Billy Rick
excerpt: "A post to test author overrides using a data file."
---
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.
Sites that may have content authored from various individuals can be accommodated by using [data files](https://jekyllrb.com/docs/datafiles/).
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`
To attribute an author to a post or page that is different from the site author specified in `_config.yml`:
Start by modifying or creating a new `authors.yml` file in the `_data` folder and add your authors using the following format.
**Step 1.** Create `_data/authors.yml` and add authors using the following format. Anything variables found under `author` in `_config.yml` can be used (e.g. `name`, `avatar`, `uri`, social media profiles, etc.).
```yaml
# /_data/authors.yml
Billy Rick:
name: Billy Rick
uri: http://thewhip.com
email: billy@rick.com
name: "Billy Rick"
uri: "http://thewhip.com"
email: "billy@rick.com"
bio: "What do you want, jewels? I am a very extravagant man."
avatar: bio-photo-2.jpg
twitter: extravagantman
avatar: "bio-photo-2.jpg"
twitter: "extravagantman"
Cornelius Fiddlebone:
name: Cornelius Fiddlebone
email: cornelius@thewhip.com
name: "Cornelius Fiddlebone"
email: "cornelius@thewhip.com"
bio: "I ordered what?"
avatar: bio-photo.jpg
twitter: rhymeswithsackit
avatar: "bio-photo.jpg"
twitter: "rhymeswithsackit"
```
To assign Billy Rick as an author for our post. You'd add the following YAML front matter to a post:
**Step 2.** Assign one of the authors in `authors.yml` to a post or page you wish to override the `site.author` with.
Example: To assign `Billy Rick` as an author for a post the following YAML Front Matter would be applied:
```yaml
author: Billy Rick
```
```