From 726508dd95a1f9b96d1945a7ccfa99d3596ed38a Mon Sep 17 00:00:00 2001 From: Hristo Yankov Date: Sun, 7 Feb 2016 18:22:13 +0200 Subject: [PATCH] Add conditional avatar --- README.md | 1 + _includes/nav.html | 10 +++++----- _layouts/default.html | 9 +++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e6e35ba..986c4f1 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ css | List of local 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"]`) 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 don't want to appear on every page you can turn it off by removing this flag from the default layout (_layouts/default.html) and enable it only on the pages where you want to. Note: the specific value doesn't matter only whether it's defined or not. ### RSS feed diff --git a/_includes/nav.html b/_includes/nav.html index e9aa662..0e9d434 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -22,7 +22,7 @@ {% assign internal = false %} {% endif %} {% endif %} - + {% if internal %} {% capture linkurl %}{{ site.baseurl }}/{{ link[1] }}{% endcapture %} {% else %} @@ -34,8 +34,8 @@ {% endfor %} - - {% if site.avatar %} + + {% if site.avatar and page.show-avatar %}
{% endif %} - + - + diff --git a/_layouts/default.html b/_layouts/default.html index 3956af3..5bc718d 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,4 +1,5 @@ --- +show-avatar: true common-css: - "/css/bootstrap.min.css" - "/css/main.css" @@ -15,11 +16,11 @@ common-js: - + {% include head.html %} - + {% include nav.html %}
@@ -27,8 +28,8 @@ common-js:
{% include footer.html %} - + {% include footer-scripts.html %} - +