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
This commit is contained in:
Evan Debenham
2019-01-15 09:07:56 -05:00
committed by Michael Rose
parent 86e95b4f6f
commit 282806ae07
11 changed files with 48 additions and 3 deletions

View File

@ -19,6 +19,8 @@ url : https://mmistakes.github.io # the base hostname & pro
baseurl : "/minimal-mistakes" # the subpath of your site, e.g. "/blog"
repository : "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:

View File

@ -2,7 +2,7 @@
title: "Configuration"
permalink: /docs/configuration/
excerpt: "Settings for configuring and customizing the theme."
last_modified_at: 2018-11-25T19:42:42-05:00
last_modified_at: 2019-01-15T08:31:44-05:00
toc: true
---
@ -223,6 +223,27 @@ header:
<figcaption>Example of teaser images found in the related posts module.</figcaption>
</figure>
### Site masthead logo
To insert a logo before the site title, place a graphic in the `/assets/images/` directory and add the filename to `_config.yml`:
```yaml
logo: "/assets/images/88x88.png"
```
<figure>
<img src="{{ '/assets/images/mm-masthead-logo.png' | relative_url }}" alt="masthead with logo and custom title">
<figcaption>Example of masthead with logo and custom title.</figcaption>
</figure>
### Site masthead title
By default your site title is used in the masthead. You can override this text by adding the following to your `_config.yml`:
```yaml
masthead_title: "My Custom Title"
```
### Breadcrumb navigation (beta)
Enable breadcrumb links to help visitors better navigate deep sites. Because of the fragile method of implementing them they don't always produce accurate links reliably. For best results:

View File

@ -4,7 +4,7 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2019-01-15T08:09:30-05:00
last_modified_at: 2019-01-15T08:32:58-05:00
toc: true
---
@ -12,6 +12,7 @@ toc: true
### 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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB