From 7bb68edf0353a72e82a4c39c6b153eca6721a1eb Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Fri, 5 Feb 2021 20:26:16 -0500 Subject: [PATCH] Add toggle option for RSS feed visibility (#2787) * add a "hide" value in config for atom * Update footer to use param * update header to use param * Update docs to note configuration * undo formatting * use unless syntax * unless syntax and indentation * indentation --- _config.yml | 1 + _includes/footer.html | 4 +++- _includes/head.html | 6 ++++-- docs/_docs/05-configuration.md | 9 +++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 92e645cc..2135c6f0 100644 --- a/_config.yml +++ b/_config.yml @@ -51,6 +51,7 @@ reCaptcha: secret : atom_feed: path : # blank (default) uses feed.xml + hide : # true, false (default) search : # true, false (default) search_full_content : # true, false (default) search_provider : # lunr (default), algolia, google diff --git a/_includes/footer.html b/_includes/footer.html index 2bc78963..2b53a253 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -12,7 +12,9 @@ {% endfor %} {% endif %} -
  • {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}
  • + {% unless site.atom_feed.hide %} +
  • {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}
  • + {% endunless %} diff --git a/_includes/head.html b/_includes/head.html index 3b99471f..4f1ebedb 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -2,7 +2,9 @@ {% include seo.html %} - +{% unless site.atom_feed.hide %} + +{% endunless %} @@ -34,4 +36,4 @@ {% for script in site.head_scripts %} {% endfor %} -{% endif %} +{% endif %} \ No newline at end of file diff --git a/docs/_docs/05-configuration.md b/docs/_docs/05-configuration.md index 11c22a64..0775250f 100644 --- a/docs/_docs/05-configuration.md +++ b/docs/_docs/05-configuration.md @@ -559,6 +559,15 @@ atom_feed: **Note:** By default the site feed is linked in two locations: inside the [`` element](https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/head.html) and at the bottom of every page in the [site footer](https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/footer.html). {: .notice--info} +### Disable Feed Icons + +By default the theme links to `feed.xml` generated in the root of your site by the **jekyll-feed** plugin. To remove the RSS icon in the header and footer, update `atom_feed` in `_config.yml` like so: + +```yaml +atom_feed: + hide: true +``` + ### Site search To enable site-wide search add `search: true` to your `_config.yml`.