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
This commit is contained in:
parent
5fe4c4810d
commit
7bb68edf03
4 changed files with 17 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% unless site.atom_feed.hide %}
|
||||
<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>
|
||||
{% endunless %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
{% include seo.html %}
|
||||
|
||||
{% unless site.atom_feed.hide %}
|
||||
<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">
|
||||
{% endunless %}
|
||||
|
||||
<!-- https://t.co/dKP3o1e -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
|
|
@ -559,6 +559,15 @@ atom_feed:
|
|||
**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).
|
||||
{: .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`.
|
||||
|
|
Loading…
Reference in a new issue