From 1bea0b7b1ecf0b04f724e2cda575df8bdbb70ad2 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 29 Dec 2020 21:05:48 +0100 Subject: Improved metadata generation, added ATOM feeds --- templates/base.html | 57 +++++++++++++++++++++++-------------------- templates/categoryRef.html | 12 ++++----- templates/feed.xml | 22 +++++++++++++++++ templates/pageHeaderSm.html | 2 +- templates/pagelistByYear.html | 18 ++++++-------- 5 files changed, 67 insertions(+), 44 deletions(-) create mode 100644 templates/feed.xml (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 3fca9f1..0704388 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,24 +7,27 @@ $for(author-meta)$ - + $endfor$ $if(date-meta)$ - + $endif$ $if(keywords)$ - + $endif$ - $if(ishome)$$else$$title$ – $endif$$site.title$ + $if(feed.url.abs)$ + + $endif$ + $if(is_home)$$else$$title$ – $endif$$site.title$ - $if(section)$ - + $if(section.id)$ + $endif$ @@ -33,14 +36,14 @@
$for(menus.main)$ - $it.label$ + $it.label$ $endfor$
- $if(ishome)$ + $if(is_home)$ @@ -48,26 +51,26 @@ ${pageHeader()} $body$ - $if(isblog)$ - ${categoryRef()} - ${pagelistByYear()} + $if(section.is_blog)$ + ${categories.blog:categoryRef()} + ${pagelistByYear()} $endif$
- $if(ishome)$ - - + headerEl.classList.remove("u-hidden@sm-down"); + headerEl.appendChild(headerSmEl); + $endif$ diff --git a/templates/categoryRef.html b/templates/categoryRef.html index 9a363cf..5715fa8 100644 --- a/templates/categoryRef.html +++ b/templates/categoryRef.html @@ -1,7 +1,7 @@ -$if(categories)$ - +$if(it)$ + $endif$ diff --git a/templates/feed.xml b/templates/feed.xml new file mode 100644 index 0000000..68d2fc4 --- /dev/null +++ b/templates/feed.xml @@ -0,0 +1,22 @@ + + + $if(is_home)$$else$$title$ – $endif$$site.title$ + + + $feed.last_update.rfc3339$ + $url.full$ + + $for(pages)$ + $for(it.all)$ + $if(it.date.rfc3339)$ + + $it.url.full$ + <![CDATA[$it.title$]]> + + $it.date.rfc3339$ + $it.date.rfc3339$ + + $endif$ + $endfor$ + $endfor$ + diff --git a/templates/pageHeaderSm.html b/templates/pageHeaderSm.html index 232b5b2..4db186c 100644 --- a/templates/pageHeaderSm.html +++ b/templates/pageHeaderSm.html @@ -3,7 +3,7 @@ $-- | _.~-"""-----~`` ,-´ ' ' |' | ' ' $-- '| .´ ,~'\ ).,__,)/,," ' . ' | | | ' .' $-- |_ `~´ (/\\, (/\\, _' '_ _| ' |_ _' '_ -
+
 .|                     //\__      '  .'      |  . |           ' . ' 
  |      _.~-"""-----~``  ,-´      '   '      |'   |           '   ' 
 '|   .´  ,~'\ ).,__,)/,,"         ' . '      |  | |           '  .' 
diff --git a/templates/pagelistByYear.html b/templates/pagelistByYear.html
index b884d89..ff55f0f 100644
--- a/templates/pagelistByYear.html
+++ b/templates/pagelistByYear.html
@@ -1,13 +1,11 @@
 $for(pages)$
-$for(it.by_year)$
-$-- 
-$--

$it.key$

- -$endfor$ $endfor$ -- cgit v1.2.3-70-g09d2