mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 14:31: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) -%}
|
{%- 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 -%}
|
{%- if meta -%}
|
||||||
{{- get_url(path="icons/" ~ icon ~ ".svg") -}}
|
{{- get_url(path=path) -}}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{- "https://cdn.jsdelivr.net/npm/simple-icons/icons/" ~ icon ~ ".svg" -}}
|
{{- "https://cdn.jsdelivr.net/npm/simple-icons/icons/" ~ icon ~ ".svg" -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Dark Icon -->
|
<!-- Dark Icon -->
|
||||||
<link rel="preload" as="image" href="{{ get_url(path=`icons/` ~ `theme.svg`) }}" />
|
<link rel="preload" as="image" href="{{ get_url(path=`icons/theme.svg`) }}" />
|
||||||
|
|
||||||
<!-- Math -->
|
<!-- Math -->
|
||||||
{% if page.extra.math | default(value=config.extra.math) %}
|
{% if page.extra.math | default(value=config.extra.math) %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue