aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-06-03 18:19:53 +0300
committerYaroslav <contact@yaroslavps.com>2020-06-03 18:19:53 +0300
commit93e66d4088b348899715e1f1a891c8a6092f4116 (patch)
treed53bbed35843cc6f3209fd909d1a74e1b75f2c7c
parentadd247942766de44665a4409388a6dcb0bc54ea8 (diff)
downloadyaroslavps.com-93e66d4088b348899715e1f1a891c8a6092f4116.tar.gz
yaroslavps.com-93e66d4088b348899715e1f1a891c8a6092f4116.zip
new feed url; exclude recipes from feed, at least for now
-rw-r--r--config.toml13
-rw-r--r--templates/base.html2
-rw-r--r--templates/feed.xml28
-rw-r--r--templates/index.html2
4 files changed, 40 insertions, 5 deletions
diff --git a/config.toml b/config.toml
index 009ac8a..f4edb34 100644
--- a/config.toml
+++ b/config.toml
@@ -1,17 +1,24 @@
title = "A weblog by Yaroslav de la Peña Smirnov"
base_url = "https://www.yaroslavps.com/"
-generate_rss = true
+generate_feed = true
+feed_filename = "feed.xml"
+
compile_sass = true
build_search_index = true
highlight_code = true
highlight_theme = "ayu-dark"
+taxonomies = [
+ # {name = "sections", feed = true},
+ {name = "categories"},
+]
+
default_language = "en"
languages = [
- {code = "es", search = true},
- {code = "ru", search = true},
+ {code = "es", search = true, feed = false},
+ {code = "ru", search = true, feed = false},
]
[extra]
diff --git a/templates/base.html b/templates/base.html
index bcf1487..cb9fcb7 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -30,7 +30,7 @@
<div class="links-container">
<a href="https://github.com/Yaroslav-95" title="GitHub"><span class="icon"></span></a>
<a href="https://git.yaroslavps.com/yaroslav" title="Git server"><span class="icon"></span></a>
- <a href="/rss.xml" title="RSS feed"><span class="icon"></span></a>
+ <a href="/feed.xml" title="RSS feed"><span class="icon"></span></a>
</div>
<h3>Navigation</h3>
<ul class="navigation-list">
diff --git a/templates/feed.xml b/templates/feed.xml
new file mode 100644
index 0000000..9efcf4a
--- /dev/null
+++ b/templates/feed.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
+ <title>{{ config.title }}
+ {%- if term %} - {{ term.name }}
+ {%- endif -%}
+ </title>
+ {%- if config.description %}
+ <subtitle>{{ config.description }}</subtitle>
+ {%- endif %}
+ <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
+ <link href="{{ config.base_url | safe }}"/>
+ <generator uri="https://www.getzola.org/">Zola</generator>
+ <updated>{{ last_updated | date(format="%+") }}</updated>
+ <id>{{ feed_url | safe }}</id>
+ {%- for page in pages %}
+ {% if page.permalink is containing("/food/") %}
+ {% continue %}
+ {% endif %}
+ <entry xml:lang="{{ page.lang }}">
+ <title>{{ page.title }}</title>
+ <published>{{ page.date | date(format="%+") }}</published>
+ <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated>
+ <link href="{{ page.permalink | safe }}" type="text/html"/>
+ <id>{{ page.permalink | safe }}</id>
+ <content type="html">{{ page.content }}</content>
+ </entry>
+ {%- endfor %}
+</feed>
diff --git a/templates/index.html b/templates/index.html
index f6fa5eb..c96bf15 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -9,7 +9,7 @@
<div class="links-container">
<a href="https://github.com/Yaroslav-95" title="GitHub"><span class="icon"></span></a>
<a href="https://git.yaroslavps.com/yaroslav" title="Git server"><span class="icon"></span></a>
- <a href="/rss.xml" title="RSS feed"><span class="icon"></span></a>
+ <a href="/feed.xml" title="RSS feed"><span class="icon"></span></a>
</div>
<p>Welcome, my name is Yaroslav de la Peña Smirnov. I keep this site to
sometimes write about what I do or think on my weblog, or to remind myself