mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 12:11:35 +01:00
feat: add $BASE_URL support in url
This commit is contained in:
parent
71e0389b90
commit
bf1a110516
4 changed files with 14 additions and 9 deletions
|
|
@ -38,7 +38,7 @@
|
|||
<a
|
||||
class="primary-link h-8 w-8 text-[0] [background:var(--url)_center_center/cover_no-repeat]"
|
||||
style="--url: url(./icons/{{ social.name }}.svg)"
|
||||
href="{{ social.url }}"
|
||||
href="{{ social.url | replace(from=`$BASE_URL`, to=config.base_url) | safe }}"
|
||||
target="_blank"
|
||||
rel="{% if social.name == `rss` %}alternate{% else %}me{% endif %}"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
<li>
|
||||
<a
|
||||
class="primary-link block py-2 text-center text-lg font-medium lg:px-3 lg:py-0"
|
||||
href="{{ menu.url }}"
|
||||
href="{{ menu.url | replace(from=`$BASE_URL`, to=config.base_url) | safe }}"
|
||||
>{{ menu.name }}</a
|
||||
>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,12 @@
|
|||
</div>
|
||||
<div class="flex gap-x-2">
|
||||
{% for link in project.links %}
|
||||
<a class="underline" href="{{ link.url }}" target="_blank">{{ link.name }}</a>
|
||||
<a
|
||||
class="underline"
|
||||
href="{{ link.url | replace(from=`$BASE_URL`, to=config.base_url) | safe }}"
|
||||
target="_blank"
|
||||
>{{ link.name }}</a
|
||||
>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue