aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-03-08 14:53:01 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2024-03-08 14:53:01 +0100
commitf6a545b00a4046879b7cc25c06c37bb6b6880b43 (patch)
treebc7da8066c080ff850d1e423c0e33bd5fb83e095 /templates
parent2998247083406f914b3647cedd19abf5507bf2c6 (diff)
Use serde and time
Diffstat (limited to 'templates')
-rw-r--r--templates/feed.xml6
-rw-r--r--templates/index.gmi2
-rw-r--r--templates/index.html9
-rw-r--r--templates/index.txt4
4 files changed, 10 insertions, 11 deletions
diff --git a/templates/feed.xml b/templates/feed.xml
index 17a4c7c..d95e38c 100644
--- a/templates/feed.xml
+++ b/templates/feed.xml
@@ -4,13 +4,13 @@
<title>My Ephemeral Blog</title>
<description>My Ephemeral Blog</description>
<language>en</language>
- {{~ it.posts: post}}
+ {{~ posts: post}}
<item>
<guid isPermaLink="false">blog:{{= post.id}}</guid>
- <pubDate>{{= post.createdOn}}</pubDate>
+ <pubDate>{{= post.created_on_utc}}</pubDate>
<title>{{= post.title}}</title>
<description>
- {{= post.html}}
+ {{= post.escaped_html}}
</description>
</item>
{{~}}
diff --git a/templates/index.gmi b/templates/index.gmi
index 9df2f55..33832b1 100644
--- a/templates/index.gmi
+++ b/templates/index.gmi
@@ -1,3 +1,3 @@
# Gemlog Archive
-{{= it.posts }}
+{{= posts }}
diff --git a/templates/index.html b/templates/index.html
index e28be64..5b818a6 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,5 +1,4 @@
-<!doctype html>
-<html lang="en">
+<!doctype html> <html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -23,13 +22,13 @@
This blog is also available in <a href="./index.txt">txt</a>
and <a href="./feed.xml">rss</a>
</p>
- {{~ it.posts: post}}
- <article class="h-entry" id="{{= post.index + 1}}">
+ {{~ posts: post}}
+ <article class="h-entry" id="{{= post.index}}">
{{= post.html}}
</article>
<hr class="separator">
{{~}}
- {{? it.posts.length === 0}}
+ {{? !has_posts}}
<h1>This is a fresh blog!</h1>
<p>There are no posts yet.</p>
{{?}}
diff --git a/templates/index.txt b/templates/index.txt
index 1474e7c..ca0fba4 100644
--- a/templates/index.txt
+++ b/templates/index.txt
@@ -1,10 +1,10 @@
# My Ephemeral Blog
-{{~ it.posts: post}}
+{{~ posts: post}}
{{= post.raw}}
------------------------------------
{{~}}
-{{? it.posts.length === 0}}
+{{? posts_count == 0}}
## This is a fresh blog!
There are no posts yet.