mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed meta source only rendering first character
This commit is contained in:
parent
e8200730b3
commit
a0308b0dce
@ -73,16 +73,7 @@ is defined inside the project's `mkdocs.yml`, the files can be linked using the
|
||||
source: file.js
|
||||
```
|
||||
|
||||
A new entry at the bottom of the table of contents is generated that is linking
|
||||
to the section listing the linked source files. Multiple files can be linked by
|
||||
adding filenames on separate lines:
|
||||
|
||||
``` markdown
|
||||
source: file.js
|
||||
file.css
|
||||
```
|
||||
|
||||
The filenames are appended to the `repo_url` set in your `mkdocs.yml`, but can
|
||||
The filename is appended to the `repo_url` set in your `mkdocs.yml`, but can
|
||||
be prefixed with a `path` to ensure correct path resolving:
|
||||
|
||||
Example:
|
||||
|
@ -139,12 +139,11 @@
|
||||
{% 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 %}
|
||||
{% 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>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -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 %}
|
||||
{% 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>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user