diff options
| author | Jieiku | 2022-05-31 02:37:04 -0700 |
|---|---|---|
| committer | Jieiku | 2022-05-31 02:37:04 -0700 |
| commit | dd536476ec055027a0a72b4b0394d48eb8484a9a (patch) | |
| tree | bfef5ee2c2b284e973f0f3f0c4109d36281e8cd0 | |
| parent | 49f72d5d171e84b2f2c18825dac6128b81fbd348 (diff) | |
| download | abridge-dd536476ec055027a0a72b4b0394d48eb8484a9a.tar.gz abridge-dd536476ec055027a0a72b4b0394d48eb8484a9a.tar.bz2 abridge-dd536476ec055027a0a72b4b0394d48eb8484a9a.zip | |
Determine Atom vs Rss Feed Type
| -rw-r--r-- | config.toml | 1 | ||||
| -rw-r--r-- | templates/macros/head.html | 2 | ||||
| -rw-r--r-- | templates/macros/social.html | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/config.toml b/config.toml index 649aa3e..f35f60c 100644 --- a/config.toml +++ b/config.toml @@ -91,7 +91,6 @@ security_header_referrer = "strict-origin-when-cross-origin" banner = "banner.png" # Used as default image for OpenGraph/Twitter if page specific image is undefined. js_search_index = "search_index.en.js" js_search = "search.min.js" -rss_atom_feed = "atom.xml" stylesheet = "abridge.css" # location and file to use for stylesheet: # abridge.css - Orange Automatic Dark/Light Theme based on browser/system preference. # abridge-dark.css - Orange Dark Theme diff --git a/templates/macros/head.html b/templates/macros/head.html index 402d99e..9e4d59f 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -26,7 +26,7 @@ {%- endif %} {%- if config.generate_feed %} - <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path=config.extra.rss_atom_feed, trailing_slash=false) }}"> + <link rel="alternate" type="{% if config.feed_filename is containing('atom') %}application/atom+xml{% else %}application/rss+xml{% endif %}" title="Atom/RSS Feed" href="{{ get_url(path=config.feed_filename, trailing_slash=false) | safe }}"> {%- endif %} {%- endmacro %} diff --git a/templates/macros/social.html b/templates/macros/social.html index 37c66af..d34fb29 100644 --- a/templates/macros/social.html +++ b/templates/macros/social.html @@ -2,7 +2,7 @@ {%- set base_url = get_url(path="", lang=lang) %} <span> {%- if config.generate_feed %}{%- if config.extra.social.feed %} - <a href="{{ get_url(path="atom.xml") }}" target="_blank"><span class="svg rss" title="Rss"></span></a>{% endif %}{% endif %} + <a href="{{ get_url(path=config.feed_filename, trailing_slash=false) | safe }}" target="_blank"><span class="svg rss" title="Atom/RSS Feed"></span></a>{% endif %}{% endif %} {%- if social_config.mail %} <a href="mailto:{{ social_config.mail }}" target="_blank"><span class="svg mail" title="Mail"></span></a>{% endif %} {%- if social_config.mastodon %} |
