From d2256790d8bf875223704baf2314b8c73402d3b0 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 15 Jan 2019 09:07:56 -0500 Subject: [PATCH] Add logo and title customization to the masthead (#2026) * Add logo and title customization to the masthead * Adjust config description * Add test site logo to `/test` * Document `site.logo` and `site.masthead_title` * Update CHANGELOG and history --- CHANGELOG.md | 1 + _config.yml | 2 ++ _includes/masthead.html | 9 ++++++++- _sass/minimal-mistakes/_masthead.scss | 4 ++++ _sass/minimal-mistakes/_navigation.scss | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed4d993..fd9529b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Enhancements +- Add logo and title customization to the masthead. [#2026](https://github.com/mmistakes/minimal-mistakes/pull/2026) - Add support to customize `issue-term` for utterances comment provider. [#2022](https://github.com/mmistakes/minimal-mistakes/pull/2022) - Allow custom canonical url on a page-by-page basis. [#2021](https://github.com/mmistakes/minimal-mistakes/pull/2021) - Update table of contents navigation based on scroll position to indicate which link is currently active in the viewport. [#2020](https://github.com/mmistakes/minimal-mistakes/pull/2020) diff --git a/_config.yml b/_config.yml index ae48ca3..689c38a 100644 --- a/_config.yml +++ b/_config.yml @@ -24,6 +24,8 @@ url : # the base hostname & protocol for your site e.g. "ht baseurl : # the subpath of your site, e.g. "/blog" repository : # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes" teaser : # path of fallback teaser image, e.g. "/assets/images/500x300.png" +logo : # path of logo image to display in the masthead, e.g. "/assets/images/88x88.png" +masthead_title : # overrides the website title displayed in the masthead, use " " for no title # breadcrumbs : false # true, false (default) words_per_minute : 200 comments: diff --git a/_includes/masthead.html b/_includes/masthead.html index f36d2c6..f3ee59e 100644 --- a/_includes/masthead.html +++ b/_includes/masthead.html @@ -1,8 +1,15 @@ +{% if site.logo contains "://" %} + {% capture logo_path %}{{ site.logo }}{% endcapture %} +{% else %} + {% capture logo_path %}{{ site.logo | relative_url }}{% endcapture %} +{% endif %} +