Improve author link flexibility
Deprecate social networking links in `_config.yml` in favor or new `author.links` array for any link and in any order. All of Font Awesome's icons are available for use.
```
author:
links:
- label: "Your Website"
icon: "fas fa-fw fa-link"
url: "https://your-site.com"
- label: "Twitter"
icon: "fab fa-fw fa-twitter-square"
url: "https://twitter.com/username"
- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/username"
- label: "Instagram"
icon: "fab fa-fw fa-instagram"
url: "https://instagram.com/username"
```
Fixes #1581
This commit is contained in:
@@ -91,31 +91,19 @@ author:
|
||||
avatar : "/assets/images/bio-photo.jpg"
|
||||
bio : "I am an amazing person."
|
||||
location : "Somewhere"
|
||||
email :
|
||||
uri :
|
||||
home : # null (default), "absolute or relative url to link to author home"
|
||||
bitbucket :
|
||||
codepen :
|
||||
dribbble :
|
||||
flickr :
|
||||
facebook :
|
||||
foursquare :
|
||||
github :
|
||||
google_plus :
|
||||
keybase :
|
||||
instagram :
|
||||
lastfm :
|
||||
linkedin :
|
||||
pinterest :
|
||||
soundcloud :
|
||||
stackoverflow : # "123456/username" (the last part of your profile url, e.g. http://stackoverflow.com/users/123456/username)
|
||||
steam :
|
||||
tumblr :
|
||||
twitter : "mmistakes"
|
||||
vine :
|
||||
weibo :
|
||||
xing :
|
||||
youtube : # "https://youtube.com/c/MichaelRoseDesign"
|
||||
links:
|
||||
- label: "Your Website"
|
||||
icon: "fas fa-fw fa-link"
|
||||
url: "https://your-site.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/"
|
||||
- label: "GitHub"
|
||||
icon: "fab fa-fw fa-github"
|
||||
url: "https://github.com/"
|
||||
- label: "Instagram"
|
||||
icon: "fab fa-fw fa-instagram"
|
||||
url: "https://instagram.com/"
|
||||
|
||||
|
||||
# Reading Files
|
||||
|
||||
@@ -2,17 +2,27 @@
|
||||
|
||||
Billy Rick:
|
||||
name : "Billy Rick"
|
||||
uri : "http://thewhip.com"
|
||||
email : "billy@rick.com"
|
||||
bio : "What do you want, jewels? I am a very extravagant man."
|
||||
avatar : "/assets/images/bio-photo-2.jpg"
|
||||
twitter : "extravagantman"
|
||||
google_plus : "BillyRick"
|
||||
links:
|
||||
- label: "Email"
|
||||
icon: "fas fa-fw fa-envelope-square"
|
||||
url: "mailto:billyrick@rick.com"
|
||||
- label: "Website"
|
||||
icon: "fas fa-fw fa-link"
|
||||
url: "https://thewhip.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/extravagantman"
|
||||
|
||||
Cornelius Fiddlebone:
|
||||
name : "Cornelius Fiddlebone"
|
||||
email : "cornelius@thewhip.com"
|
||||
bio : "I ordered what?"
|
||||
avatar : "/assets/images/bio-photo.jpg"
|
||||
twitter : "rhymeswithsackit"
|
||||
google_plus : "CorneliusFiddlebone"
|
||||
links:
|
||||
- label: "Email"
|
||||
icon: "fas fa-fw fa-envelope-square"
|
||||
url: "mailto:cornelius@thewhip.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/rhymeswithsackit"
|
||||
@@ -8,25 +8,37 @@ Sites that may have content authored from various individuals can be accommodate
|
||||
|
||||
To attribute an author to a post or page that is different from the site author specified in `_config.yml`:
|
||||
|
||||
**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.).
|
||||
**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`, `bio`, `avatar`, author `links`, etc.).
|
||||
|
||||
```yaml
|
||||
# /_data/authors.yml
|
||||
|
||||
Billy Rick:
|
||||
name: "Billy Rick"
|
||||
uri: "http://thewhip.com"
|
||||
email: "billy@rick.com"
|
||||
bio: "What do you want, jewels? I am a very extravagant man."
|
||||
avatar: "/assets/images/bio-photo-2.jpg"
|
||||
twitter: "extravagantman"
|
||||
name : "Billy Rick"
|
||||
bio : "What do you want, jewels? I am a very extravagant man."
|
||||
avatar : "/assets/images/bio-photo-2.jpg"
|
||||
links:
|
||||
- label: "Email"
|
||||
icon: "fas fa-fw fa-envelope-square"
|
||||
url: "mailto:billyrick@rick.com"
|
||||
- label: "Website"
|
||||
icon: "fas fa-fw fa-link"
|
||||
url: "https://thewhip.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/extravagantman"
|
||||
|
||||
Cornelius Fiddlebone:
|
||||
name: "Cornelius Fiddlebone"
|
||||
email: "cornelius@thewhip.com"
|
||||
bio: "I ordered what?"
|
||||
avatar: "/assets/images/bio-photo.jpg"
|
||||
twitter: "rhymeswithsackit"
|
||||
name : "Cornelius Fiddlebone"
|
||||
bio : "I ordered what?"
|
||||
avatar : "/assets/images/bio-photo.jpg"
|
||||
links:
|
||||
- label: "Email"
|
||||
icon: "fas fa-fw fa-envelope-square"
|
||||
url: "mailto:cornelius@thewhip.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/rhymeswithsackit"
|
||||
```
|
||||
|
||||
**Step 2.** Assign one of the authors in `authors.yml` to a post or page you wish to override the `site.author` with.
|
||||
|
||||
Reference in New Issue
Block a user