mirror of https://github.com/luizdepra/hugo-coder.git

Luiz F. A. de Prá
03.45.2023 1ac9df38a59aea83e16163d7579b1dfc02904e90
Add SVG favicon (#822)

Add the SVG favicon options.
2 files modified
1 files added
18 ■■■■■ changed files
docs/configurations.md 4 ●●● patch | view | raw | blame | history
exampleSite/static/images/favicon.svg 13 ●●●●● patch | view | raw | blame | history
layouts/partials/head/custom-icons.html 1 ●●●● patch | view | raw | blame | history
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"
exampleSite/static/images/favicon.svg
New file
@@ -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>
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">