Skip to content

Commit

Permalink
Rest of RSS attrs/elems
Browse files Browse the repository at this point in the history
  • Loading branch information
yawaramin committed Jan 12, 2025
1 parent 7b33956 commit b18e728
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pure-html/pure_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -930,17 +930,33 @@ module Atom = struct
end

module RSS = struct
(* Attributes *)

let domain fmt = uri_attr "domain" fmt
let length v = int_attr "length" v
let path fmt = uri_attr "path" fmt
let port v = int_attr "name" v
let protocol fmt = string_attr "protocol" fmt
let register_procedure fmt = string_attr "registerProcedure" fmt
let type_ = HTML.type_
let url_ fmt = uri_attr "url" fmt
let version_2 = "version", "2.0"

(* Tags *)

let author attrs fmt = text_tag "author" attrs fmt
let channel = std_tag "channel"
let category attrs fmt = text_tag "category" attrs fmt
let cloud attrs = void_tag "cloud" attrs
let comments attrs fmt = uri_tag "comments" attrs fmt
let copyright attrs fmt = text_tag "copyright" attrs fmt
let description attrs fmt = text_tag "description" attrs fmt
let docs attrs fmt = text_tag "docs" attrs fmt
let enclosure = std_tag "enclosure"
let generator attrs fmt = text_tag "generator" attrs fmt
let guid attrs fmt = text_tag "guid" attrs fmt
let height attrs fmt = text_tag "height" attrs fmt
let image = std_tag "image"
let item = std_tag "item"
let language attrs fmt = text_tag "language" attrs fmt
let last_build_date attrs fmt = text_tag "lastBuildDate" attrs fmt
Expand All @@ -950,7 +966,9 @@ module RSS = struct
let rss = std_tag "rss"
let title attrs fmt = text_tag "title" attrs fmt
let ttl attrs fmt = text_tag "ttl" attrs fmt
let url attrs fmt = uri_tag "url" attrs fmt
let web_master attrs fmt = text_tag "webMaster" attrs fmt
let width attrs fmt = text_tag "width" attrs fmt
end

module Hx = struct
Expand Down
13 changes: 13 additions & 0 deletions pure-html/pure_html.mli
Original file line number Diff line number Diff line change
Expand Up @@ -958,19 +958,30 @@ module RSS : sig
(** {3 Attributes} *)

val domain : _ string_attr
val length : int to_attr
val path : _ string_attr
val port : int to_attr
val protocol : _ string_attr
val register_procedure : _ string_attr
val type_ : _ string_attr
val url_ : _ string_attr
val version_2 : attr

(** {3 Tags} *)

val author : _ text_tag
val channel : std_tag
val category : _ text_tag
val cloud : void_tag
val comments : _ text_tag
val copyright : _ text_tag
val description : _ text_tag
val docs : _ text_tag
val enclosure : std_tag
val generator : _ text_tag
val guid : _ text_tag
val height : _ text_tag
val image : std_tag
val item : std_tag
val language : _ text_tag
val last_build_date : _ text_tag
Expand All @@ -980,7 +991,9 @@ module RSS : sig
val rss : std_tag
val title : _ text_tag
val ttl : _ text_tag
val url : _ text_tag
val web_master : _ text_tag
val width : _ text_tag
end

(** {2 htmx} *)
Expand Down

0 comments on commit b18e728

Please sign in to comment.