diff --git a/CHANGELOG.md b/CHANGELOG.md index 8954209bf9fa..32a565c330d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Disable comments in `development` environment. [#1363](https://github.com/mmistakes/minimal-mistakes/pull/1363) * Exclude specific pages/posts from search index by adding `search: false` to the YAML Front Matter. [#1369](https://github.com/mmistakes/minimal-mistakes/pull/1369) * Add optional `description` key to masthead links for clarifying their purpose with the `title` attribute. [#1380](https://github.com/mmistakes/minimal-mistakes/pull/1380) +* Incorporate site search into masthead. [#1383](https://github.com/mmistakes/minimal-mistakes/pull/1383) ### Bug Fixes diff --git a/_config.yml b/_config.yml index 3e653631db0d..e96564fa3fe8 100644 --- a/_config.yml +++ b/_config.yml @@ -51,6 +51,7 @@ reCaptcha: secret : atom_feed: path : # blank (default) uses feed.xml +search : # true, false (default) # SEO Related google_site_verification : diff --git a/_includes/masthead.html b/_includes/masthead.html index 623ff3639127..70ac7c6af272 100644 --- a/_includes/masthead.html +++ b/_includes/masthead.html @@ -15,7 +15,14 @@ {% endfor %} - + {% endif %} + diff --git a/_includes/scripts.html b/_includes/scripts.html index 8a454e7bf4d7..ea03be3954b5 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -11,7 +11,7 @@ {% endif %} -{% if page.layout == 'search' %} +{% if site.search == true or page.layout == 'search' %} {% endif %} diff --git a/_includes/search_form.html b/_includes/search_form.html new file mode 100644 index 000000000000..b9bf70fd32e5 --- /dev/null +++ b/_includes/search_form.html @@ -0,0 +1,4 @@ +
+ +
+
\ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 39b99757f863..f3a87244f2c4 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -19,7 +19,15 @@ {% include browser-upgrade.html %} {% include masthead.html %} - {{ content }} +
+ {{ content }} +
+ + {% if site.search == true %} +
+ {% include search_form.html %} +
+ {% endif %}