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

Behaviour for dynamically providing llms.txt sections.

Implement `sections/0` to return a list of sections, where each section
is a tuple of `{section_name, entries}`.

Each entry is one of:
- `{name, url}` — a link
- `{name, url, description}` — a link with a description
- `{name, entries}` — a sub-section (rendered as H3) containing its own entries
- `"string"` — inline markdown content rendered as-is

A section named `"Optional"` signals to LLMs that its content can be
skipped when context is limited.

## Example

    defmodule MyAppWeb.LLMsProvider do
      @behaviour SEO.LLMs.Provider

      @impl true
      def sections do
        [
          {"Docs", [
            {"API Reference", "/docs/api.md", "Full REST API docs"},
            {"Guides", "/docs/guides.md"}
          ]},
          {"SDKs", [
            {"TypeScript", [
              {"Client SDK", "/sdk/ts", "TypeScript client"},
              {"Server SDK", "/sdk/ts-server"}
            ]},
            {"Python", [
              {"Client SDK", "/sdk/py"}
            ]}
          ]},
          {"Optional", [
            {"Changelog", "/changelog.md"}
          ]}
        ]
      end
    end

# `entry`

```elixir
@type entry() :: link() | sub_section() | String.t()
```

# `link`

```elixir
@type link() ::
  {name :: String.t(), url :: String.t()}
  | {name :: String.t(), url :: String.t(), description :: String.t()}
```

# `section`

```elixir
@type section() :: {name :: String.t(), [entry()]}
```

# `sub_section`

```elixir
@type sub_section() :: {name :: String.t(), [entry()]}
```

# `sections`

```elixir
@callback sections() :: [section()]
```

---

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