From c69722ba45f516138d4185ea3fade93acb3bff12 Mon Sep 17 00:00:00 2001 From: "Viet Anh, Nguyen" Date: Thu, 29 Sep 2016 08:36:33 +0000 Subject: [PATCH] add fb app ID, improve social sharing descriptions (#105) * add fb app ID, improve social sharing descriptions * add share-img * Fix sharing img * Change for fb app ID and Google Analytics --- _config.yml | 3 +++ _includes/head.html | 66 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 55 insertions(+), 14 deletions(-) diff --git a/_config.yml b/_config.yml index 1d8ab1b..8dc616f 100644 --- a/_config.yml +++ b/_config.yml @@ -88,6 +88,9 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # Fill in your Google Analytics ID to track your website using GA #google_analytics: "" +# Facebook App ID +# fb_app_id: "" + # --- Don't need to touch anything below here (but you can if you want) --- # # Output options (more information on Jekyll's site) diff --git a/_includes/head.html b/_includes/head.html index 7c5cff7..0e22dde 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -6,7 +6,7 @@ {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - + {% if page.subtitle %} {% endif %} @@ -17,14 +17,14 @@ {% for css in layout.common-ext-css %} {% endfor %} - {% endif %} - + {% endif %} + {% if layout.common-css %} {% for css in layout.common-css %} {% endfor %} - {% endif %} - + {% endif %} + {% if layout.common-googlefonts %} {% for font in layout.common-googlefonts %} @@ -35,8 +35,8 @@ {% for css in page.ext-css %} {% endfor %} - {% endif %} - + {% endif %} + {% if page.css %} {% for css in page.css %} @@ -49,32 +49,70 @@ {% endfor %} {% endif %} - - + + {% if site.fb_app_id %} + + {% endif %} + + {% if page.meta-title %} + + {% elsif page.title %} + + {% else %} + + {% endif %} + + {% if page.meta-description %} + + {% elsif page.subtitle %} + + {% else %} + + {% endif %} + + + {% if page.id %} + {% else %} + {% endif %} + {% if page.share-img %} {% elsif site.avatar %} - {% else %} - {% endif %} + - - + + {% if page.meta-title %} + + {% elsif page.title %} + + {% else %} + + {% endif %} + + {% if page.meta-description %} + + {% elsif page.subtitle %} + + {% else %} + + {% endif %} + {% if page.share-img %} {% elsif site.avatar %} {% endif %} - +