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:
Sean Killeen
2021-02-05 20:26:16 -05:00
committed by GitHub
parent 5fe4c4810d
commit 7bb68edf03
4 changed files with 17 additions and 3 deletions

View File

@@ -12,7 +12,9 @@
{% endfor %}
{% endif %}
<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>
{% 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>

View File

@@ -2,7 +2,9 @@
{% 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">
{% 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">
@@ -34,4 +36,4 @@
{% for script in site.head_scripts %}
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}
{% endif %}