Fixed meta source only rendering first character

This commit is contained in:
squidfunk
2017-11-01 15:22:14 +01:00
committed by Martin Donath
parent e8200730b3
commit a0308b0dce
3 changed files with 12 additions and 23 deletions

View File

@@ -264,13 +264,12 @@
{% block source %}
{% if page.meta.source %}
<h2 id="__source">{{ lang.t("meta.source") }}</h2>
{% set path = (page.meta.path | default([""]) | first) %}
{% for file in page.meta.source %}
<a href="{{ [config.repo_url, path, file] | join('/') }}"
title="{{ file }}" class="md-source-file">
{{ file }}
</a>
{% endfor %}
{% set path = (page.meta.path | default([""])) %}
{% set file = page.meta.source %}
<a href="{{ [config.repo_url, path, file] | join('/') }}"
title="{{ file }}" class="md-source-file">
{{ file }}
</a>
{% endif %}
{% endblock %}
{% endblock %}