satelito-sample

This is a sample web site for the Satelito ssg.
git clone git://soucy.cc/satelito-sample.git
Log | Files | Refs

commit de2aa2cc3558639516ea6d3a73e5ed61dd7e33f4
parent 5fa4bcb40204ab55feb1e6ed18371833a6ebcf00
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Mon, 19 Apr 2021 20:08:29 -0400

Update the feed template

Diffstat:
Mtemplates/feed.xml.html | 28+++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/templates/feed.xml.html b/templates/feed.xml.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr"> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="<%- language -%>"> <title><%- title -%></title> <% if description then %> <subtitle><%- description -%></subtitle> @@ -15,17 +15,19 @@ <uri><%- author.uri -%></uri> </author> - <% table.sort(children, function(a , b) return tonumber(a.time_created) > tonumber(b.time_created) end) %> - <% for i, child in ipairs(children) do %> - <entry> - <title><%- child.title -%></title> - <id><%- child.id -%></id> - <link href="<%= child.permalink -%>" hreflang="<%= child.language -%>" rel="alternate" type="text/html" /> - <published><%= child.date -%>T<%= child.datetime -%>Z</published> - <updated><%- os.date('%Y-%m-%dT%H:%M:%S', child.time_modification) -%>Z</updated> - <content type="html"> - <%= child.content -%> - </content> - </entry> + <% if list then %> + <% table.sort(list, function(a , b) return tonumber(site[a].time_created) > tonumber(site[b].time_created) end) %> + <% for i, child in ipairs(list) do %> + <entry> + <title><%- site[child].title -%></title> + <id><%- site[child].id -%></id> + <link href="<%= site[child].permalink -%>" hreflang="<%= site[child].language -%>" rel="alternate" type="text/html" /> + <published><%= site[child].date -%>T<%= site[child].datetime -%>Z</published> + <updated><%- os.date('%Y-%m-%dT%H:%M:%S', site[child].time_modification) -%>Z</updated> + <content type="html"> + <%= site[child].content -%> + </content> + </entry> + <% end %> <% end %> </feed>