diff --git a/docs/extensions/metadata.md b/docs/extensions/metadata.md index c0d0320a7..4dddb34e2 100644 --- a/docs/extensions/metadata.md +++ b/docs/extensions/metadata.md @@ -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: diff --git a/material/base.html b/material/base.html index 708fb2bf6..dcdd0a864 100644 --- a/material/base.html +++ b/material/base.html @@ -139,12 +139,11 @@ {% block source %} {% if page.meta.source %}

{{ lang.t("meta.source") }}

- {% set path = (page.meta.path | default([""]) | first) %} - {% for file in page.meta.source %} - - {{ file }} - - {% endfor %} + {% set path = (page.meta.path | default([""])) %} + {% set file = page.meta.source %} + + {{ file }} + {% endif %} {% endblock %} {% endblock %} diff --git a/src/base.html b/src/base.html index 8516e386b..787d1f076 100644 --- a/src/base.html +++ b/src/base.html @@ -264,13 +264,12 @@ {% block source %} {% if page.meta.source %}

{{ lang.t("meta.source") }}

- {% set path = (page.meta.path | default([""]) | first) %} - {% for file in page.meta.source %} - - {{ file }} - - {% endfor %} + {% set path = (page.meta.path | default([""])) %} + {% set file = page.meta.source %} + + {{ file }} + {% endif %} {% endblock %} {% endblock %}