This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

LlmsTxtEndpointExtensions Pennington.LlmsTxt

Endpoint convention extensions for opting a MapGet route into the generated llms.txt index.

Methods

WithLlmsTxtEntry<TBuilder>

#
public static TBuilder WithLlmsTxtEntry<TBuilder>(TBuilder builder, string title, string description = null)

Registers the endpoint as an llms.txt entry. The route's URL is the link target in the generated index — typical use is a MapGet("/_llms/{slug}.md", () => Results.Text(markdown, "text/markdown")) that returns markdown directly. No HTML page is manufactured, and no sidecar is generated; the user-supplied response IS the content llms.txt consumers fetch.

Parameters

builder TBuilder
The endpoint convention builder.
title string
Display title for the entry.
description string
Optional description rendered after the link.

Returns

TBuilder
The same builder, for chaining.

Pennington.LlmsTxt.LlmsTxtEndpointExtensions

namespace Pennington.LlmsTxt;

/// Endpoint convention extensions for opting a MapGet route into the generated llms.txt index.
public class LlmsTxtEndpointExtensions
{
    /// Registers the endpoint as an llms.txt entry. The route's URL is the link target in the generated index — typical use is a MapGet("/_llms/{slug}.md", () => Results.Text(markdown, "text/markdown")) that returns markdown directly. No HTML page is manufactured, and no sidecar is generated; the user-supplied response IS the content llms.txt consumers fetch.
    
public static TBuilder WithLlmsTxtEntry<TBuilder>(TBuilder builder, string title, string description = null)
; }