Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garthdb/jekyll-author
A Jekyll plugin that manages all the author data from _config.yml and _data/authors.*
https://github.com/garthdb/jekyll-author
Last synced: 3 months ago
JSON representation
A Jekyll plugin that manages all the author data from _config.yml and _data/authors.*
- Host: GitHub
- URL: https://github.com/garthdb/jekyll-author
- Owner: GarthDB
- License: mit
- Created: 2016-05-04T17:20:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T20:32:10.000Z (10 months ago)
- Last Synced: 2024-10-04T00:25:44.737Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.markdown
- License: LICENSE
Awesome Lists containing this project
README
# Jekyll Authors Plugin
A Jekyll plugin that manages all the author data from `_config.yml` and `_data/authors.*`
[![Build Status](https://travis-ci.org/GarthDB/jekyll-author.svg)](https://travis-ci.org/GarthDB/jekyll-author)
# Author information
A list of authors can be declared in `_config.yml` as an array in `authors` and/or in a [Jekyll data file](https://jekyllrb.com/docs/datafiles/) (ie `_data/authors.yml` or `_data/authors.json`).
*Note:* if an author slug is used in both lists (like `benbalter` in the examples below) it will keep the information from the `_config.yml` file and reject the `_data/authors.*` author data with the same slug.
Example `_config.yml`:
```yml
timezone: UTCauthors:
garthdb:
name: Garth Braithwaite
uri: http://garthdb.com/
email: [email protected]
twitter: garthdb
benbalter:
name: Ben Balter
uri: http://ben.balter.com/
email: [email protected]
twitter: benbalter
```Example `_data/authors.yml`:
```yml
pathawks:
name: Pat Hawks
uri: https://pathawks.com
email: [email protected]
twitter: pathawks
benbalter:
name: The Ben Balter
uri: http://ben.balter.com/
email: [email protected]
twitter: benbalter
```The author information can then be referenced in a post by using the author slug.
For example if a post had the front matter:
```yml
---
title: "Super Great Post Title"
author: "benbalter"
---
```The layout could use the author information from list:
```liquid
{% if page.author.name and page.author.uri %}
{{ page.author.name }}
{% else %}
{{ page.author }}
{% endif %}
```It is recommended to check if properties needed are available and to fallback to the author if they are not.