diff --git a/docs/content/configuration/branding/logo/_index.en.md b/docs/content/configuration/branding/logo/_index.en.md index 17cf402ef2..dcd0cddec1 100644 --- a/docs/content/configuration/branding/logo/_index.en.md +++ b/docs/content/configuration/branding/logo/_index.en.md @@ -7,9 +7,9 @@ weight = 1 ## Change the Favicon -If your favicon is an SVG, PNG, or ICO, just drop your image in your site's `static/images/` directory and name it `favicon.svg`, `favicon.png`, or `favicon.ico` respectively. +If your favicon is an SVG, PNG, or ICO, just drop your image in your site's `assets/images/` or `static/images/` directory and name it `favicon.svg`, `favicon.png`, or `favicon.ico` respectively. -If you want to adjust your favicon according to your OS settings for light/dark mode, add the image files `static/images/favicon-light.svg` and `static/images/favicon-dark.svg` to your site's directory, respectively, corresponding to your file format. In case some of the files are missing, the theme falls back to `favicon.svg` for each missing file. All supplied favicons must be of the same file format. +If you want to adjust your favicon according to your OS settings for light/dark mode, add the image files `assets/images/favicon-light.svg` and `assets/images/favicon-dark.svg` to your site's directory, respectively, corresponding to your file format. In case some of the files are missing, the theme falls back to `favicon.svg` for each missing file. All supplied favicons must be of the same file format. If no favicon file is found, the theme will look up the alternative filename `logo` in the same location and will repeat the search for the list of supported file types. diff --git a/docs/content/introduction/releasenotes/7/4.en.md b/docs/content/introduction/releasenotes/7/4.en.md index b31d4e2ead..12a0fd5067 100644 --- a/docs/content/introduction/releasenotes/7/4.en.md +++ b/docs/content/introduction/releasenotes/7/4.en.md @@ -50,6 +50,8 @@ weight = -4 - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The logo color is now configurable via the `--MENU-HEADER-color` variable in your variant stylesheets. +- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Now favicons are also searched in the `assets/images` directory. + - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Table headers are sticky now. - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes documentation has been moved from `exampleSite` to `docs` to make place for a [brand new exampleSite](https://mcshelby.github.io/hugo-theme-relearn/exampleSite/about/index.html). diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html index 648d6bd803..133066d7e9 100644 --- a/layouts/partials/favicon.html +++ b/layouts/partials/favicon.html @@ -8,15 +8,24 @@ {{- range $faviconNames }} {{- $faviconName := . }} {{- range $faviconTypes }} - {{- if fileExists (printf "/static/images/%s.%s" $faviconName .ext) }} + {{- if or + (resources.Get (printf "/images/%s.%s" $faviconName .ext)) + (fileExists (printf "/static/images/%s.%s" $faviconName .ext)) + }} {{- $faviconMatch = true }} {{- end }} - {{- if (fileExists (printf "/static/images/%s-light.%s" $faviconName .ext)) }} + {{- if or + (resources.Get (printf "/images/%s-light.%s" $faviconName .ext)) + (fileExists (printf "/static/images/%s-light.%s" $faviconName .ext)) + }} {{- $faviconMatch = true }} {{- end }} - {{- if (fileExists (printf "/static/images/%s-dark.%s" $faviconName .ext)) }} + {{- if or + (resources.Get (printf "/images/%s-dark.%s" $faviconName .ext)) + (fileExists (printf "/static/images/%s-dark.%s" $faviconName .ext)) + }} {{- $faviconMatch = true }} {{- end }} diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index 48677334eb..77bc6f65ae 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.3.2+39e67e57efafc2d00755d455c30157d5fbfb3dd0 \ No newline at end of file +7.3.2+ad60ecdaa817b167fe3b06c421040a92717b367a \ No newline at end of file