Skip to content

Commit 7bb68ed

Browse files
authoredFeb 6, 2021
Add toggle option for RSS feed visibility (mmistakes#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
1 parent 5fe4c48 commit 7bb68ed

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed
 

‎_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ reCaptcha:
5151
secret :
5252
atom_feed:
5353
path : # blank (default) uses feed.xml
54+
hide : # true, false (default)
5455
search : # true, false (default)
5556
search_full_content : # true, false (default)
5657
search_provider : # lunr (default), algolia, google

‎_includes/footer.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
{% endfor %}
1313
{% endif %}
1414

15-
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
15+
{% unless site.atom_feed.hide %}
16+
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
17+
{% endunless %}
1618
</ul>
1719
</div>
1820

‎_includes/head.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
{% include seo.html %}
44

5-
<link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
5+
{% unless site.atom_feed.hide %}
6+
<link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
7+
{% endunless %}
68

79
<!-- https://t.co/dKP3o1e -->
810
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -34,4 +36,4 @@
3436
{% for script in site.head_scripts %}
3537
<script src="{{ script | relative_url }}"></script>
3638
{% endfor %}
37-
{% endif %}
39+
{% endif %}

‎docs/_docs/05-configuration.md

+9
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,15 @@ atom_feed:
559559
**Note:** By default the site feed is linked in two locations: inside the [`<head>` 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).
560560
{: .notice--info}
561561

562+
### Disable Feed Icons
563+
564+
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:
565+
566+
```yaml
567+
atom_feed:
568+
hide: true
569+
```
570+
562571
### Site search
563572

564573
To enable site-wide search add `search: true` to your `_config.yml`.

0 commit comments

Comments
 (0)
Please sign in to comment.