Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikamai/ruhoh-multiple_authors
ruhoh-multiple_authors
https://github.com/mikamai/ruhoh-multiple_authors
Last synced: 22 days ago
JSON representation
ruhoh-multiple_authors
- Host: GitHub
- URL: https://github.com/mikamai/ruhoh-multiple_authors
- Owner: mikamai
- Created: 2013-10-30T11:29:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-11T08:52:58.000Z (about 11 years ago)
- Last Synced: 2024-04-14T19:56:49.980Z (9 months ago)
- Language: Ruby
- Size: 914 KB
- Stars: 4
- Watchers: 25
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ruhoh Multiple Authors
======================Multiple Authors plugin for Ruhoh.
### Why I need it ?
If you have multiple authors in your ruhoh blog, and for each author you want to
show additional informations other than their name, you have to copy and paste
all the author infos in each page:```markdown
# example-1.md
---
title: Example 1
author:
name : John Smith
email: [email protected]
---
``````markdown
#example-2.md
---
title: Example 2
author:
name : John Smith
email: [email protected]
---
```With this plugin, you can store all the authors informations in the config file
and use only their 'id' to embed their informations, like in the following example:```
# config.yml
athors:
john:
name : John Smith
email: [email protected]# example-1.md
---
title: Example 1
author: john
---# example-2.md
---
title: Example 2
author: john
---
```If you specify an hash in your page or if the config file doesn't contain the name you have specified, it will use the default behavior (without breaking anything).
### How to use it ?
#### Requirements
Just Ruhoh. We tested it with ruhoh 2.5
#### Install it
chdir to your ruhoh blog repository path
`git submodule add git://github.com/mikamai/ruhoh-multiple_authors.git plugins/multiple_authors`
or download files and put it to `your-blog-path/plugins/multiple_authors`
#### Fill your authors info
open `your-blog-path/config.yml` and add an author hash like in the following example:
```yml
authors:
john:
name : John Smith
email: [email protected]
bio : John Smith is the best author in the world
```#### Use it
now when you create a page you can specify 'john' as the author, and you will get all the infos stored
```markdown
---
title : Example 1
author: john
---
```In the page view you will now have access to `author.name`, `author.bio` and so on, like if you defined all the author infos by hand.