mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed duplicate slashes in source file URLs
This commit is contained in:
parent
7cf7ff98a2
commit
b3e293ece9
@ -145,9 +145,13 @@
|
||||
{% block source %}
|
||||
{% if page and page.meta and page.meta.source %}
|
||||
<h2 id="__source">{{ lang.t("meta.source") }}</h2>
|
||||
{% set repo = config.repo_url %}
|
||||
{% if repo | last == "/" %}
|
||||
{% set repo = repo[:-1] %}
|
||||
{% endif %}
|
||||
{% 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">
|
||||
<a href="{{ [repo, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
|
||||
{{ file }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -276,9 +276,13 @@
|
||||
{% block source %}
|
||||
{% if page and page.meta and page.meta.source %}
|
||||
<h2 id="__source">{{ lang.t("meta.source") }}</h2>
|
||||
{% set repo = config.repo_url %}
|
||||
{% if repo | last == "/" %}
|
||||
{% set repo = repo[:-1] %}
|
||||
{% endif %}
|
||||
{% set path = page.meta.path | default([""]) %}
|
||||
{% set file = page.meta.source %}
|
||||
<a href="{{ [config.repo_url, path, file] | join('/') }}"
|
||||
<a href="{{ [repo, path, file] | join('/') }}"
|
||||
title="{{ file }}" class="md-source-file">
|
||||
{{ file }}
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user