Module Arod_component.Markdown_export

Markdown export for content negotiation.

Produces markdown representations of pages for AI agents and tools. Uses Bushel's original markdown content with links resolved to absolute URLs via Bushel.Md.to_markdown.

module Entry = Bushel.Entry
module Paper = Bushel.Paper
module Contact = Sortal_schema.Contact
module Feed = Sortal_schema.Feed
module FeedEntry = Sortal_feed.Entry

Helpers

val date_str : (int * int * int) -> string
val entry_url : ctx:Arod.Ctx.t -> Entry.entry -> string
val render_body : ctx:Arod.Ctx.t -> string -> string
val tags_line : ctx:Arod.Ctx.t -> Bushel.Entry.entry -> string
val resolve_slug : ctx:Arod.Ctx.t -> string -> (string * string * string * (int * int * int)) option
val infobox_md : ctx:Arod.Ctx.t -> [< `Idea of Bushel.Idea.t | `Note of Bushel.Note.t | `Paper of Bushel.Paper.t | `Project of Bushel.Project.t | `Video of Bushel.Video.t ] -> string

Entry to Markdown

val entry_to_markdown : ctx:Arod.Ctx.t -> Entry.entry -> string

List Page Helpers

val list_header : ctx:Arod.Ctx.t -> title:string -> description:string -> path:string -> string * string
val entry_bullet : ctx:Arod.Ctx.t -> Entry.entry -> string

List Pages

val papers_list_md : ctx:Arod.Ctx.t -> string
val notes_list_md : ctx:Arod.Ctx.t -> string
val ideas_list_md : ctx:Arod.Ctx.t -> string
val projects_list_md : ctx:Arod.Ctx.t -> string
val videos_list_md : ctx:Arod.Ctx.t -> string
val network_md : ctx:Arod.Ctx.t -> string
val index_md : ctx:Arod.Ctx.t -> string
val wiki_md : ctx:Arod.Ctx.t -> string
val news_md : ctx:Arod.Ctx.t -> string