mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-24 23:04:32 -04:00
Fixed error when only setting a single icon
This commit is contained in:
@@ -52,12 +52,6 @@ font:
|
||||
# icons that are part of the HTML can be configured and replaced
|
||||
icon:
|
||||
|
||||
# Shown if no logo is set
|
||||
logo: material/library
|
||||
|
||||
# Repository icon
|
||||
repo: fontawesome/brands/git-alt
|
||||
|
||||
# Favicon to be rendered
|
||||
favicon: assets/images/favicon.png
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
{% if config.theme.logo %}
|
||||
<img src="{{ config.theme.logo | url }}" alt="logo" />
|
||||
{% else %}
|
||||
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
||||
{% set icon = config.theme.icon.logo or "material/library" %}
|
||||
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
<label
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
{% if config.theme.logo %}
|
||||
<img src="{{ config.theme.logo | url }}" alt="logo" />
|
||||
{% else %}
|
||||
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
||||
{% set icon = config.theme.icon.logo or "material/library" %}
|
||||
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
{{ config.site_name }}
|
||||
|
||||
@@ -34,5 +34,6 @@
|
||||
class="md-content__button md-icon"
|
||||
>
|
||||
{{ lang.t("meta.source") }}
|
||||
{% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
||||
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||
</a>
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
class="md-source"
|
||||
>
|
||||
<div class="md-source__icon md-icon">
|
||||
{% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
||||
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||
</div>
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
|
||||
Reference in New Issue
Block a user