Skip to content

Commit 0b07957

Browse files
committed
fix: get_social_icon can not get local icon
1 parent f6e3990 commit 0b07957

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

templates/macros.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{%- macro get_social_icon(icon) -%}
2-
{%- set meta = get_image_metadata(path="/static/icons/" ~ icon ~ ".svg", allow_missing=true) -%}
2+
{%- set path = "icons/" ~ icon ~ ".svg" -%}
3+
{%- set meta = get_image_metadata(path=path, allow_missing=true) -%}
34
{%- if meta -%}
4-
{{- get_url(path="icons/" ~ icon ~ ".svg") -}}
5+
{{- get_url(path=path) -}}
56
{%- else -%}
67
{{- "https://cdn.jsdelivr.net/npm/simple-icons/icons/" ~ icon ~ ".svg" -}}
78
{%- endif -%}

templates/partials/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
{% endif %}
8989

9090
<!-- Dark Icon -->
91-
<link rel="preload" as="image" href="{{ get_url(path=`icons/` ~ `theme.svg`) }}" />
91+
<link rel="preload" as="image" href="{{ get_url(path=`icons/theme.svg`) }}" />
9292

9393
<!-- Math -->
9494
{% if page.extra.math | default(value=config.extra.math) %}

0 commit comments

Comments
 (0)