gemoire-1.0.1: yet another static gemlog generator + converter
Copyright(c) 2024 Sena
LicenseGPL-3.0-or-later
Maintainercontact@sena.pink
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gemoire.Gemlog.Feed

Description

Feed related functions and default templates for gemlogs

The variables that are available to use in a feed template is not defined here, as feeds need the whole gemlog. See Gemlog for the variables available in the intended use.

Synopsis

Utility functions

sortPosts :: [Values] -> [Values] Source #

Sorts the posts by the last modified.

lastModified :: [Values] -> Values Source #

Takes the modified time and date of the latest post in the list, in the form of a map of Values with the variables modified and modified_date, like in readPost.

escapeFeed Source #

Arguments

:: Bool

Whether the feed is a gemfeed

-> Values 
-> Values 

Escapes variables in feeds. Only does bare minimum of encoding, enough to make the feed valid.

  • Percent encodes the variable base and those ending with url.
  • Doesn't do anything to the variable entries.
  • Ampersand encodes everything else only for Atom feeds.

Templates