mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 13:21:35 +01:00
fix: get_social_icon can not get local icon
This commit is contained in:
parent
f6e399016a
commit
0b07957c59
2 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,8 @@
|
|||
{%- macro get_social_icon(icon) -%}
|
||||
{%- set meta = get_image_metadata(path="/static/icons/" ~ icon ~ ".svg", allow_missing=true) -%}
|
||||
{%- set path = "icons/" ~ icon ~ ".svg" -%}
|
||||
{%- set meta = get_image_metadata(path=path, allow_missing=true) -%}
|
||||
{%- if meta -%}
|
||||
{{- get_url(path="icons/" ~ icon ~ ".svg") -}}
|
||||
{{- get_url(path=path) -}}
|
||||
{%- else -%}
|
||||
{{- "https://cdn.jsdelivr.net/npm/simple-icons/icons/" ~ icon ~ ".svg" -}}
|
||||
{%- endif -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue