Merge pull request #36 from hristoyankov/master

Add conditional avatar
This commit is contained in:
Dean Attali 2016-02-08 15:11:14 -08:00
commit 7cc1cd9b1d
4 changed files with 11 additions and 9 deletions

View File

@ -134,6 +134,7 @@ css | List of local CSS files to include in the page
ex-css | List of external CSS files to include in the page ex-css | List of external CSS files to include in the page
googlefonts | List of Google fonts to include in the page (eg. `["Monoton", "Lobster"]`) googlefonts | List of Google fonts to include in the page (eg. `["Monoton", "Lobster"]`)
fb-img | If you want to share a page on Facebook, by default Facebook will use the first image it can find on the page. If you want to specify an image to use when sharing the page on Facebook, then provide the image's URL here fb-img | If you want to share a page on Facebook, by default Facebook will use the first image it can find on the page. If you want to specify an image to use when sharing the page on Facebook, then provide the image's URL here
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`. If you want to turn it off by default, locate the line `show-avatar: true` in the file `_config.yml` and change the `true` to `false`; then you can selectively turn it on in specific pages using `show-avatar: true`.
### RSS feed ### RSS feed

View File

@ -88,6 +88,7 @@ defaults:
path: "" # all files path: "" # all files
values: values:
layout: "default" layout: "default"
show-avatar: true
# Exclude these files from production site # Exclude these files from production site
exclude: exclude:

View File

@ -35,7 +35,7 @@
</ul> </ul>
</div> </div>
{% if site.avatar %} {% if site.avatar and (layout.show-avatar or page.show-avatar) %}
<div class="avatar-container"> <div class="avatar-container">
<div class="avatar-img-border"> <div class="avatar-img-border">
<a href="{{ site.url }} "> <a href="{{ site.url }} ">