From b2bb9acc0f96feaf9f5708bae33f2680a27bd72c Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 8 Mar 2015 17:22:51 +0000 Subject: sort tag lists by creation date --- templates/document-listing.tt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/document-listing.tt b/templates/document-listing.tt index 9cf4775..c42f961 100644 --- a/templates/document-listing.tt +++ b/templates/document-listing.tt @@ -1,12 +1,14 @@ [% docs = []; FOR doc IN tagged.$path; IF isLang(language,doc); - docs.push(doc); + uri=dstUriFor(doc); + dates=datesFor(language,'',uri); + docs.push({'uri'=>uri,'creation'=>dates.creation}); END; END -%] [% IF docs.size > 0 %] .. class:: doc-tag-list -[% FOR doc IN docs %] -* `<[% dstUriFor(doc) %]>`_ +[% FOR doc IN docs.sortf('creation') %] +* `<[% doc.uri %]>`_ [% END; END %] -- cgit v1.2.3