From 9d18b7cb629a750400f16451f58dd849e9bcd5e3 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Wed, 22 Nov 2023 10:49:08 +0200 Subject: [PATCH] feat: feeds, more testing --- config.toml | 8 ++++---- content/_index.md | 2 +- content/one/2023-11-20-001.md | 1 + content/one/_index.md | 4 ++++ content/two/_index.md | 1 + templates/layouts/base.html | 2 ++ templates/project.html | 18 ++++++++++++------ 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/config.toml b/config.toml index 0d021cd..44dcd66 100644 --- a/config.toml +++ b/config.toml @@ -1,10 +1,10 @@ base_url = "https://liljamo.dev" title = "liljamo projects" -description = "showcase and devlog site for personal projects" +#description = "showcase and devlog site for personal projects" # default author -author = "Jonni Liljamo " +author = "Jonni Liljamo" default_language = "en" # theme = "" # none @@ -17,8 +17,8 @@ build_search_index = false ignored_content = [] -generate_feed = true -feed_filename = "atom.xml" +generate_feed = false +# feed_filename = "atom.xml" # feed_limit = 20 # unlimited when not set taxonomies = [] diff --git a/content/_index.md b/content/_index.md index 82cd1a3..c1c349a 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,5 +1,5 @@ +++ title = "Index" -sort_by = "date" +sort_by = "weight" template = "index.html" +++ diff --git a/content/one/2023-11-20-001.md b/content/one/2023-11-20-001.md index a26efd6..2502eee 100644 --- a/content/one/2023-11-20-001.md +++ b/content/one/2023-11-20-001.md @@ -1,6 +1,7 @@ +++ slug = "001" title = "log 1: I did a thing" +description = "this is a test" # 'page.date' is in filename updated = "2023-11-20" diff --git a/content/one/_index.md b/content/one/_index.md index 5be94ef..f62008a 100644 --- a/content/one/_index.md +++ b/content/one/_index.md @@ -2,7 +2,11 @@ weight = 10 title = "Test One" +description = "a test project" + sort_by = "date" template = "project.html" page_template = "log.html" + +generate_feed = true +++ diff --git a/content/two/_index.md b/content/two/_index.md index f41eb13..d04d641 100644 --- a/content/two/_index.md +++ b/content/two/_index.md @@ -2,6 +2,7 @@ weight = 20 title = "Test Two" + sort_by = "date" template = "project.html" page_template = "log.html" diff --git a/templates/layouts/base.html b/templates/layouts/base.html index 4b288f2..6074be3 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -5,6 +5,8 @@ + + {% block extra_head %} {% endblock %}
diff --git a/templates/project.html b/templates/project.html index 532f4ee..6254bad 100644 --- a/templates/project.html +++ b/templates/project.html @@ -1,13 +1,19 @@ {% extends "layouts/base.html" %} +{% block extra_head %} + +{% endblock extra_head %} {% block content %}

{{ section.title }}

- {% if section.pages %} -

has logs

-{% for page in section.pages %} -{{ page.title }} -{% endfor %} +
+

has logs

+ {% if section.generate_feed %} + RSS Feed + {% endif %} + {% for page in section.pages %} + {{ page.title }} + {% endfor %} +
{% endif %} - {% endblock content %} -- 2.44.1