Represents a single resource entry in an llms.txt file.
Each entry belongs to a section and has a title, URL, optional description, and optional markdown content (for serving the resource as markdown).
Fields
:section— which H2 section this entry belongs to (e.g.,"Docs","Articles","Optional"):title— the link text:url— the link target URL:description— optional text after the link in llms.txt:content— optional markdown body for serving the page as markdown. Can be a string or a zero-arity function for lazy loading.
Summary
Functions
Build an Entry struct from attributes, optionally merging with defaults.
Group a list of entries by their :section field into the tuple format
that SEO.LLMs.render/1 expects.
Types
Functions
@spec build(SEO.attrs(), SEO.config()) :: t() | nil
Build an Entry struct from attributes, optionally merging with defaults.
@spec group_by_section([t()]) :: [SEO.LLMs.Provider.section()]
Group a list of entries by their :section field into the tuple format
that SEO.LLMs.render/1 expects.
Returns a list of {section_name, entries} tuples where entries are
{title, url} or {title, url, description} tuples.
Example
entries = [
%SEO.LLMs.Entry{section: "Docs", title: "API", url: "/api"},
%SEO.LLMs.Entry{section: "Docs", title: "Guide", url: "/guide", description: "Getting started"},
%SEO.LLMs.Entry{section: "Optional", title: "FAQ", url: "/faq"}
]
SEO.LLMs.Entry.group_by_section(entries)
#=> [{"Docs", [{"API", "/api"}, {"Guide", "/guide", "Getting started"}]},
#=> {"Optional", [{"FAQ", "/faq"}]}]