Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toggle option for RSS feed visibility #2787

Merged
merged 8 commits into from
Feb 6, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
{% endfor %}
{% endif %}

{% if !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>
SeanKilleen marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
</ul>
</div>

Expand Down
13 changes: 8 additions & 5 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

{% include seo.html %}

<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">
{% if !site.atom_feed.hide %}
SeanKilleen marked this conversation as resolved.
Show resolved Hide resolved
<link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"
SeanKilleen marked this conversation as resolved.
Show resolved Hide resolved
type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
{% endif %}

<!-- https://t.co/dKP3o1e -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down Expand Up @@ -31,7 +34,7 @@
<![endif]-->

{% if site.head_scripts %}
{% for script in site.head_scripts %}
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}
{% for script in site.head_scripts %}
SeanKilleen marked this conversation as resolved.
Show resolved Hide resolved
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}
9 changes: 9 additions & 0 deletions docs/_docs/05-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down