diff --git a/templates/index.html b/templates/index.html
index 42366b5..1ee2a77 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -12,7 +12,12 @@
{{ head_macros::head(config=config) }}
{%- if config.generate_feed %}
-
+ {%- if "rss" in config.feed_filename %}
+ {% set feed_type = 'rss+xml' %}
+ {%- else %}
+ {% set feed_type = 'atom+xml' %}
+ {% endif -%}
+
{% endif -%}
{%- if config.extra.favicon %}