diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 8075e0797..b7501c732 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -150,7 +150,15 @@ module.exports = function(grunt) { '<%= _templates %>/__common__/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg', 'img/searxng.svg': '<%= _brand %>/searxng.svg' } - } + }, + favicon: { + options: { + svgo: ['--config', 'svg4favicon.svgo.js'] + }, + files: { + 'img/favicon.svg': '<%= _brand %>/searxng-wordmark.svg' + } + }, }, svg2png: { favicon: { diff --git a/searx/static/themes/simple/svg4favicon.svgo.js b/searx/static/themes/simple/svg4favicon.svgo.js new file mode 100644 index 000000000..b9dd0da8e --- /dev/null +++ b/searx/static/themes/simple/svg4favicon.svgo.js @@ -0,0 +1,16 @@ +/** + * @license + * SPDX-License-Identifier: AGPL-3.0-or-later + * + * svgo config: Optimize SVG for WEB usage + */ + +module.exports = { + plugins: [ + { + name: 'preset-default', + }, + // make diff friendly + 'sortAttrs', + ], +}; diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index 52a5e5192..bb1f51cad 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -31,7 +31,8 @@ {% block head %} {% endblock %} - + +