fix: avatar_url use get_url

This commit is contained in:
st1020 2023-12-04 19:33:35 +08:00
parent c900940ca2
commit f7731a9083
3 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ highlight_theme = "base16-ocean-dark"
[extra.profile] [extra.profile]
name = "Kita - Zola Theme" name = "Kita - Zola Theme"
bio = "Kita is a clean, elegant and simple blog theme for Zola." bio = "Kita is a clean, elegant and simple blog theme for Zola."
avatar_url = "./icons/github.svg" avatar_url = "icons/github.svg"
avatar_invert = true avatar_invert = true
[[extra.profile.social]] [[extra.profile.social]]

View file

@ -19,7 +19,7 @@
> >
<img <img
class="{% if config.extra.profile.avatar_invert %}dark:invert{% endif %} my-0 aspect-square w-16 rounded-full !bg-black/5 hover:animate-spin" class="{% if config.extra.profile.avatar_invert %}dark:invert{% endif %} my-0 aspect-square w-16 rounded-full !bg-black/5 hover:animate-spin"
src="{{ config.extra.profile.avatar_url }}" src="{{ get_url(path=config.extra.profile.avatar_url) }}"
alt="{{ config.extra.profile.name | default(value=config.title) }}" alt="{{ config.extra.profile.name | default(value=config.title) }}"
/> />
</div> </div>

View file

@ -34,7 +34,7 @@
{% if section.path is defined and section.path == "/" %} {% if section.path is defined and section.path == "/" %}
<!-- Avatar --> <!-- Avatar -->
{% if config.extra.profile.avatar_url %} {% if config.extra.profile.avatar_url %}
<link rel="preload" as="image" href="{{ config.extra.profile.avatar_url }}" /> <link rel="preload" as="image" href="{{ get_url(path=config.extra.profile.avatar_url) }}" />
{% endif %} {% endif %}
<!-- Social List --> <!-- Social List -->