generate valid atom
This commit is contained in:
parent
e71a904120
commit
3243fc2e81
|
@ -1,4 +1,5 @@
|
|||
open Post
|
||||
(* See https://validator.w3.org/feed/ *)
|
||||
|
||||
let format_entry ~title ~date ~url ~contents ~author =
|
||||
String.concat ""
|
||||
|
@ -11,7 +12,7 @@ let format_entry ~title ~date ~url ~contents ~author =
|
|||
<author>
|
||||
<name>|}; author; {|</name>
|
||||
</author>
|
||||
<updated>|}; ISO8601.Permissive.string_of_datetime date;{|</updated>
|
||||
<updated>|}; ISO8601.Permissive.string_of_datetimezone (date, 0.) ;{|</updated>
|
||||
<link href="|}; url ;{|" rel="alternate" />
|
||||
<content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">|};
|
||||
contents;
|
||||
|
@ -27,7 +28,7 @@ let format_feed ~title ~subtitle ~author ~feed_url ~site_url ~last_updated ~(ent
|
|||
<title>|}; title; {|</title>
|
||||
<id>|}; feed_url; {|</id>
|
||||
<subtitle>|}; subtitle; {|</subtitle>
|
||||
<updated>|}; ISO8601.Permissive.string_of_datetime last_updated; {|</updated>
|
||||
<updated>|}; ISO8601.Permissive.string_of_datetimezone (last_updated, 0.); {|</updated>
|
||||
<link href="|}; feed_url; {|" rel="self"/>
|
||||
<link href="|}; site_url; {|"/>
|
||||
|}] in
|
||||
|
|
Loading…
Reference in New Issue