# `SEO.LLMs.Entry`
[🔗](https://github.com/dbernheisel/phoenix_seo/blob/0.2.1/lib/seo/llms/entry.ex#L1)

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.

# `t`

```elixir
@type t() :: %SEO.LLMs.Entry{
  content: String.t() | (-&gt; String.t()) | nil,
  description: String.t() | nil,
  section: String.t() | nil,
  title: String.t() | nil,
  url: String.t() | nil
}
```

# `build`

```elixir
@spec build(SEO.attrs(), SEO.config()) :: t() | nil
```

Build an Entry struct from attributes, optionally merging with defaults.

# `group_by_section`

```elixir
@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"}]}]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
