feat: add $BASE_URL support in url

This commit is contained in:
st1020 2023-10-23 20:57:18 +08:00
parent 71e0389b90
commit bf1a110516
4 changed files with 14 additions and 9 deletions

View file

@ -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>