Module Arod_component.Entry

Shared entry components for the Arod site.

Provides common types, utilities, and rendering functions for Bushel entries including headings, metadata, date formatting, and body rendering.

module Entry = Bushel.Entry
module Paper = Bushel.Paper
module Note = Bushel.Note
module Video = Bushel.Video
module Idea = Bushel.Idea
module Project = Bushel.Project
module Tags = Bushel.Tags
module Img = Srcsetter
module Contact = Sortal_schema.Contact

Entry Types

type entry_type = [
  1. | `Paper
  2. | `Note
  3. | `Video
  4. | `Idea
  5. | `Project
]
val entry_type_to_string : [< `Idea | `Note | `Paper | `Project | `Video ] -> string
val entry_type_of_string : string -> [> `Idea | `Note | `Paper | `Project | `Video ] option

Date Formatting

val int_to_date_suffix : r:bool -> int -> string
val ptime_date : ?r:bool -> ?with_d:bool -> (int * int * int) -> string

Icon Helpers

val ent_to_icon : [< `Idea of 'a | `Note of 'b | `Paper of 'c | `Project of 'd | `Video of 'e ] -> string

Entry Filtering

val entry_matches_type : [> `Idea | `Note | `Paper | `Project | `Video ] list -> [> `Idea of 'a | `Note of 'b | `Paper of 'c | `Project of 'd | `Video of 'e ] -> bool
val get_entries : ctx:Arod.Ctx.t -> types:[> `Idea | `Note | `Paper | `Project | `Video ] list -> Entry.entry list
val perma_entries : ctx:Arod.Ctx.t -> Entry.entry list

Markdown Rendering

val md_to_html : ctx:Arod__.Arod_ctx.t -> string -> string

Body Rendering

val truncated_body : ctx:Arod__.Arod_ctx.t -> Bushel.Entry.entry -> Htmlit.El.html * (int * bool) option
val full_body : ctx:Arod__.Arod_ctx.t -> Entry.entry -> Htmlit.El.html

Entry Heading

val heading : ctx:'a -> ?tag:string -> Entry.entry -> Htmlit.El.html

Metadata Row

val meta : ctx:Arod.Ctx.t -> ?backlinks_content:Htmlit.El.html -> Entry.entry -> Htmlit.El.html

Entry Type Label

val sort_of_ent : [< `Idea of 'a | `Note of Note.t | `Paper of Paper.t | `Project of 'b | `Video of 'c ] -> string * string