+ "Format a line for a field NAME with a VALUE.
+
+NAME may be a string or a symbol; if it is a symbol, the
+symbol name is used (removing a leading ':' if present).
+
+VALUE may be any value; except for the following special values,
+the unquoted printed representation of it is used:
+
+- `now' means the current time; see `pelican-timestamp'.
+
+- `slug' means the file's path relative to the document root sans
+ extension; see `pelican-default-slug'.
+
+- nil or an empty strings means return an empty string, without
+ any name or value."
+ (setq value (pcase value
+ ('now (pelican-timestamp))
+ ('slug (pelican-default-slug))
+ ('"" nil)
+ (_ value)))
+ (when (symbolp name)
+ (setq name (string-remove-prefix ":" (symbol-name name))))