mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed broken source files links
This commit is contained in:
parent
00b7e600a8
commit
eaaefe4fc4
@ -127,8 +127,7 @@
|
||||
<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('/') | replace('//', '/') }}" title="{{ file }}" class="md-source-file">
|
||||
<a href="{{ [config.repo_url, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
|
||||
{{ file }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
@ -246,15 +246,7 @@
|
||||
<h2 id="__source">{{ lang.t('meta.source') }}</h2>
|
||||
{% set path = (page.meta.path | default([""]) | first) %}
|
||||
{% for file in page.meta.source %}
|
||||
|
||||
<!--
|
||||
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('//', '/') }}"
|
||||
<a href="{{ [config.repo_url, path, file] | join('/') }}"
|
||||
title="{{ file }}" class="md-source-file">
|
||||
{{ file }}
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user