Make title url absolute

This commit is contained in:
HackerNCoder 2024-01-24 04:18:22 +01:00
parent 72ad2be899
commit 4028fda5b0

View file

@ -10,7 +10,7 @@
<ul class="list-none">
{% for post in this.children %}
<li class="bib">
<span class="bib-title"><a href="{{ post|url }}">{{ post.title }}</a></span>
<span class="bib-title"><a href="{{ post|url(absolute=true) }}">{{ post.title }}</a></span>
{% if post.epub %}<span class="bib-orig">{% for item in post.epub %}[{% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}<a href="{{ url }}">{{ url.split('://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/epub/{{ url }}">EPUB</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}] {% endfor %}</span>{% endif %}
{% if post.html %}<span class="bib-orig">[<a href="/lib/html/{{ post.html }}/">HTML</a>]</span>{% endif %}
{% if post.orig %}<span class="bib-orig">{% for item in post.orig %}({% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}<a href="{{ url }}">{{ url.split('://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/cache/{{ url }}">cached</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}) {% endfor %}</span>{% endif %}<br>