From fcbd47c2cb070ff44d792e85860025ab7611a2e2 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 11 Mar 2020 11:24:40 +0100 Subject: [PATCH] Fixed error when only setting a single icon --- material/mkdocs_theme.yml | 6 ------ material/partials/header.html | 3 ++- material/partials/nav.html | 3 ++- material/partials/source-link.html | 3 ++- material/partials/source.html | 3 ++- mkdocs.yml | 2 -- src/mkdocs_theme.yml | 6 ------ src/partials/header.html | 3 ++- src/partials/nav.html | 3 ++- src/partials/source-link.html | 3 ++- src/partials/source.html | 3 ++- 11 files changed, 16 insertions(+), 22 deletions(-) diff --git a/material/mkdocs_theme.yml b/material/mkdocs_theme.yml index df133a1cf..c60c657bd 100644 --- a/material/mkdocs_theme.yml +++ b/material/mkdocs_theme.yml @@ -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 diff --git a/material/partials/header.html b/material/partials/header.html index 90438e8cf..984512b5a 100644 --- a/material/partials/header.html +++ b/material/partials/header.html @@ -7,7 +7,8 @@ {% if config.theme.logo %} logo {% else %} - {% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %} + {% set icon = config.theme.icon.logo or "material/library" %} + {% include ".icons/" ~ icon ~ ".svg" %} {% endif %}