From 91fef8025c3709c323aeb20e4e8b2f2e85b8beed Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 15 Apr 2024 14:40:47 +0000 Subject: [PATCH] Resolve #66 : Add noindex to 404.html Signed-off-by: GitHub Action --- README.md | 7 ++++++- layouts/partials/site-meta.html | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69233eb..af430af 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,12 @@ Use [RealFaviconGenerator](https://realfavicongenerator.net/) to generate these * safari-pinned-tab.svg * site.webmanifest -If your favicon source is in the svg format, save it as `assets/images/favicon.svg` to enable svg favicon for supported browsers. +#### SVG Favicons + +If your favicon is in SVG format, there are two ways to implement the same in this theme. + +* If you are looking for a clean directory structure, place your favicon as `favicon.svg` in `static` directory. **In this mode, favicon will not be minified by Hugo** +* If you want your generated site to be as light as possible, place your favicon as `favicon.svg` in `assets/images`. **In this mode, favicon will be minified by Hugo** ### Social icons diff --git a/layouts/partials/site-meta.html b/layouts/partials/site-meta.html index 02f62b5..190bde6 100644 --- a/layouts/partials/site-meta.html +++ b/layouts/partials/site-meta.html @@ -2,12 +2,16 @@ +{{- if (not (in .Page.RelPermalink "404")) -}} +{{- else -}} + +{{- end -}} {{- if (fileExists "static/favicon.ico") -}} - + {{- end -}} {{ $favicon := "images/favicon.svg" }} {{- if (fileExists (printf "assets/%s" $favicon)) -}}