From 1ac9df38a59aea83e16163d7579b1dfc02904e90 Mon Sep 17 00:00:00 2001
From: Luiz F. A. de PrĂ¡ <luizdepra@users.noreply.github.com>
Date: Mon, 03 Jul 2023 00:45:08 +0000
Subject: [PATCH] Add SVG favicon (#822)

---
 exampleSite/static/images/favicon.svg   |   13 +++++++++++++
 docs/configurations.md                  |    4 +++-
 layouts/partials/head/custom-icons.html |    1 +
 3 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/docs/configurations.md b/docs/configurations.md
index fe4e401..e86fc7b 100644
--- a/docs/configurations.md
+++ b/docs/configurations.md
@@ -111,7 +111,8 @@
 | description                   | string | Yes      | Description of the site.                         |                                  | `"John Doe's personal website"`                  |
 | keywords                      | string | Yes      | Site keywords.                                   |                                  | `"blog,developer,personal"`                      |
 | avatarURL                     | string | No       | Photo of the author.                             |                                  | `"images/avatar.jpg"`                            |
-| gravatar                      | string | No       | Gravatar photo of the author                     |                                  | `"john.doe@example.com"`                         |
+| gravatar                      | string | No       | Gravatar photo of the author                     |                                  | `"john.doe@example.com"`                       |
+| faviconSVG                    | string | No       | Custom path to a SCG favicon.                    | `"/img/favicon.svg"`             | `"/img/favicon.svg"`                       |
 | favicon_32                    | string | No       | Custom path to a 32x32 favicon.                  | `"/img/favicon-32x32.png"`       | `"/img/favicon-32x32.png"`                       |
 | favicon_16                    | string | No       | Custom path to a 16x16 favicon.                  | `"/img/favicon-16x16.png"`       | `"/img/favicon-16x16.png"`                       |
 | touchIcon                     | string | No       | Custom path to a touch-icon                      | `"/images/apple-touch-icon.png"` | `"/images/apple-touch-icon.png"`                 |
@@ -256,6 +257,7 @@
   avatarurl = "images/avatar.jpg"
   #gravatar = "john.doe@example.com"
 
+  faviconSVG = "/img/favicon.svg"
   favicon_32 = "/img/favicon-32x32.png"
   favicon_16 = "/img/favicon-16x16.png"
 
diff --git a/exampleSite/static/images/favicon.svg b/exampleSite/static/images/favicon.svg
new file mode 100644
index 0000000..432b43c
--- /dev/null
+++ b/exampleSite/static/images/favicon.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
+<g>
+	<rect x="4.686" y="4.686" transform="matrix(0.7071 0.7071 -0.7071 0.7071 16 -6.6274)" fill="#000000" width="22.627" height="22.627"/>
+	<polygon fill="#FFFFFF" points="29.403,16 21.874,23.529 21.874,20.472 26.346,16 21.874,11.528 21.874,8.471 	"/>
+	<polygon fill="#FFFFFF" points="19.811,9.464 19.811,14.71 12.166,14.71 12.166,9.488 16,5.654 	"/>
+	<polygon fill="#FFFFFF" points="19.811,16.492 19.811,22.535 16,26.346 12.166,22.512 12.166,16.492 	"/>
+	<polygon fill="#FFFFFF" points="10.126,11.528 5.654,16 10.126,20.472 10.126,23.529 2.597,16 10.126,8.471 	"/>
+</g>
+</svg>
diff --git a/layouts/partials/head/custom-icons.html b/layouts/partials/head/custom-icons.html
index 0b1ec4f..6bad1a1 100644
--- a/layouts/partials/head/custom-icons.html
+++ b/layouts/partials/head/custom-icons.html
@@ -1,3 +1,4 @@
+<link rel="icon" type="image/svg+xml" href="{{ .Site.Params.faviconSVG | default "/images/favicon.svg" | relURL }}" sizes="any">
 <link rel="icon" type="image/png" href="{{ .Site.Params.favicon_32 | default "/images/favicon-32x32.png" | relURL }}" sizes="32x32">
 <link rel="icon" type="image/png" href="{{ .Site.Params.favicon_16 | default "/images/favicon-16x16.png" | relURL }}" sizes="16x16">
 

--
Gitblit v1.10.0