From b57c8fd059c227e8887348fa37588c2d468dd1d0 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 +++++ docs/_config.yml | 2 ++ docs/_docs/05-configuration.md | 23 ++++++++++++++++++++++- docs/_docs/18-history.md | 3 ++- docs/assets/images/mm-masthead-logo.png | Bin 0 -> 28648 bytes test/_config.yml | 2 ++ test/assets/images/apple-touch-icon.png | Bin 0 -> 1464 bytes 11 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 docs/assets/images/mm-masthead-logo.png create mode 100644 test/assets/images/apple-touch-icon.png diff --git a/CHANGELOG.md b/CHANGELOG.md index ed4d99321cdc..fd9529b544b3 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 522ced1b2457..7ac22f486f75 100644 --- a/_config.yml +++ b/_config.yml @@ -25,6 +25,8 @@ url : "https://chukycheese.github.io" baseurl : "" 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 f36d2c6ece8c..f3ee59e9d32c 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 %} +