Skip to content
Snippets Groups Projects
Commit eaaefe4f authored by squidfunk's avatar squidfunk Committed by Martin Donath
Browse files

Fixed broken source files links

parent 00b7e600
No related branches found
No related tags found
No related merge requests found
...@@ -127,8 +127,7 @@ ...@@ -127,8 +127,7 @@
<h2 id="__source">{{ lang.t('meta.source') }}</h2> <h2 id="__source">{{ lang.t('meta.source') }}</h2>
{% set path = (page.meta.path | default([""]) | first) %} {% set path = (page.meta.path | default([""]) | first) %}
{% for file in page.meta.source %} {% for file in page.meta.source %}
<a href="{{ [config.repo_url, path, file] | <a href="{{ [config.repo_url, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
join('/') | replace('//', '/') }}" title="{{ file }}" class="md-source-file">
{{ file }} {{ file }}
</a> </a>
{% endfor %} {% endfor %}
......
...@@ -246,15 +246,7 @@ ...@@ -246,15 +246,7 @@
<h2 id="__source">{{ lang.t('meta.source') }}</h2> <h2 id="__source">{{ lang.t('meta.source') }}</h2>
{% set path = (page.meta.path | default([""]) | first) %} {% set path = (page.meta.path | default([""]) | first) %}
{% for file in page.meta.source %} {% for file in page.meta.source %}
<a href="{{ [config.repo_url, path, file] | join('/') }}"
<!--
Hack: here, we just glue all parts of the source file
path together, ensure that there are slashes and remove
double slashes afterwards. Not beautiful, but it will
catch a lot of use cases.
-->
<a href="{{ [config.repo_url, path, file] |
join('/') | replace('//', '/') }}"
title="{{ file }}" class="md-source-file"> title="{{ file }}" class="md-source-file">
{{ file }} {{ file }}
</a> </a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment