A static site generator that can put the toothpaste back in the tube.
git clone https://git.stjo.hn/squeeze
Log | Files | Refs | README | LICENSE

commit d16f458b41cbdf7132c2013798829196ebf66540
parent 817f19652b199196c0fe86b01ed7e98fa27c55f4
Author: St John Karp <contact@stjo.hn>
Date:   Tue, 20 Oct 2020 05:41:47 -0500

Don't sort the RSS articles in Prolog

Apparently the Prolog sort was creating a weird order. I thought
it would key off the first term (i.e. the date), but I guess not.
Seeing as it doesn't seem to matter to RSS readers, which are probably
smart enough to sort these things on their own according to the user's
preferences, there's not much point in fixing it.

Mgenerate_rss.pl | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/generate_rss.pl b/generate_rss.pl @@ -15,17 +15,15 @@ % generate_rss(+Filenames). % Filenames is a list of atoms containing paths to all Markdown files with a date. -% These files will be read, sorted by date, and used to generate an RSS of the most +% These files will be read and used to generate an RSS of the most % recent posts. generate_rss(Filenames):- % Read in all the files so we have their dates and contents. files_to_articles(Filenames, Articles), - % Sort articles by date. - sort(Articles, SortedArticles), % Get the build date. today(BuildDate), % Convert to RSS and write to stdout. - rss(BuildDate, SortedArticles, RSSCodes, []), + rss(BuildDate, Articles, RSSCodes, []), write_codes(user_output, RSSCodes), halt.