From a2ea06d513a5802964f8f0ef5795cec7e548ed7b Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sat, 13 Sep 2025 14:55:15 -0600 Subject: Squashed 'themes/tabi-lean/' content from commit 95c8796 git-subtree-dir: themes/tabi-lean git-subtree-split: 95c879696445ede40daa7a30a88dae5dd74d5c0c --- templates/atom.xml | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 templates/atom.xml (limited to 'templates/atom.xml') diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..3e5b55c --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,110 @@ +{%- import "macros/translate.html" as macros_translate -%} +{%- import "macros/settings.html" as macros_settings -%} +{#- Load the internationalisation data -#} +{%- set language_strings = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%} +{%- if not language_strings -%} + {%- set language_strings = load_data(path="themes/tabi/i18n/" ~ lang ~ ".toml", required=false) -%} +{%- endif -%} + + + + + {{ config.base_url }} + + {{ config.extra.separator | default(value="•") }} + + + {{- macros_translate::translate(key="about_feeds", default="This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader", language_strings=language_strings) -}} + + + {{- macros_translate::translate(key="visit_the_site", default="Visit website", language_strings=language_strings) -}} + + + {{- macros_translate::translate(key="recent_posts", default="Recent posts", language_strings=language_strings) -}} + + + {{- macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -}} + + + {{- config.extra.default_theme | default(value="") -}} + + + {{- config.extra.post_listing_date | default(value="date") -}} + + + {%- if term -%} + {{ term.name }} + {%- elif section.title -%} + {{ section.title }} + {%- else -%} + {{ config.title }} + {%- endif -%} + + + + {#- Load extra CSS (skin) if set in config.toml -#} + {%- if config.extra.skin -%} + + {%- endif -%} + + {{ config.title | striptags | safe }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + {%- if config.description %} + {{ config.description }} + {%- endif %} + + + Zola + {%- if last_updated -%} + {{ last_updated | date(format="%+") }} + {%- endif -%} + {{ feed_url | safe }} + {%- for page in pages %} + {%- if macros_settings::evaluate_setting_priority(setting="hide_from_feed", page=page, default_global_value=false) == "true" -%} + {%- continue -%} + {%- endif -%} + {#- Skip if hide_from_main_feed is true and this is the main feed -#} + {%- if macros_settings::evaluate_setting_priority(setting="hide_from_main_feed", page=page, default_global_value=false) == "true" + and not section + and not term -%} + {%- continue -%} + {%- endif -%} + + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ page.updated | default(value=page.date) | date(format="%+") }} + + + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + + + {{ page.permalink | safe }} + {% if config.extra.full_content_in_feed %} + {{ page.content }} + {% endif -%} + {% if page.description -%} + {{ page.description }} + {% elif page.summary -%} + {{ page.summary | striptags | trim_end_matches(pat=".") | safe }}… + {% endif -%} + + {%- endfor %} + -- cgit v1.2.3