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

commit ad6b47e80dd3f19aa7d67f2cc06bf6c340b752c2
parent c9ad927ad1e32a9b8ae3acc48faa113ced196958
Author: St John Karp <stjohn@mulligrubs.me>
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.