From 457c69912b2d830c3a1aa24290aa155c293f72ad Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Sun, 20 Feb 2022 08:19:47 +0330 Subject: [PATCH] Add custom favicon if needed (#386) --- _config.yml | 3 ++- _includes/head.html | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index b0101c9c1e8f..cd03e34986a5 100644 --- a/_config.yml +++ b/_config.yml @@ -15,7 +15,8 @@ footer_text: > Photos from Unsplash. keywords: jekyll, jekyll-theme, academic-website, portfolio-website # add your own keywords or leave empty -icon: 🌎 # the emoji used as the favicon +icon: 🌎 # the emoji used as the favicon (alternatively, provide image name in /assets/img/) + url: # the base hostname & protocol for your site baseurl: # the subpath of your site, e.g. /blog/ last_updated: false # set to true if you want to display last updated in the footer diff --git a/_includes/head.html b/_includes/head.html index c1f0fd594169..3dc3cfacd9d9 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,4 +1,3 @@ - {% include metadata.html %} @@ -15,9 +14,11 @@ - {% if site.icon != empty -%} - - {%- endif %} + {% if site.icon.size == 1 %} + + {% elsif site.icon != blank %} + + {% endif %}