Skip to content

Commit

Permalink
feat: support SVG favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Dec 31, 2024
1 parent 30e38df commit 150d8a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/layouts/partials/metatags.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
<link rel="icon" href="{{ url(favicon_ico, {'canonical': true}) }}" type="image/x-icon" />
<link rel="shortcut icon" href="{{ url(favicon_ico, {'canonical': true}) }}" type="image/x-icon" />
{%- endif -%}
{#- favicon.svg ~#}
{%- set favicon_svg = asset('favicon.svg', {'ignore_missing': true}) -%}
{%- if not favicon_svg.missing ~%}
<link rel="icon" sizes="any" href="{{ url(favicon_svg, {'canonical': true}) }}" type="image/svg+xml" />
{%- endif -%}
{#- favicon.png ~#}
{%- set favicon_asset = asset(site.metatags.favicon.image|default('favicon.png'), {'ignore_missing': true}) -%}
{%- if not favicon_asset.missing -%}
Expand Down

0 comments on commit 150d8a0

Please sign in to comment.