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

LlmsTxtServiceExtensions Pennington.LlmsTxt

DI extension methods for the llms.txt feature.

Methods

AddLlmsSubtree

#
public static IServiceCollection AddLlmsSubtree(IServiceCollection services, LlmsSubtree subtree)

Registers a LlmsSubtree so all leaves under RoutePrefix get split out into a dedicated {RoutePrefix}llms.txt. Multiple registrations are allowed; programmatic registrations override _meta.yml-discovered subtrees with the same prefix.

Parameters

services IServiceCollection
subtree LlmsSubtree

Returns

IServiceCollection

Pennington.LlmsTxt.LlmsTxtServiceExtensions

namespace Pennington.LlmsTxt;

/// DI extension methods for the llms.txt feature.
public class LlmsTxtServiceExtensions
{
    /// Registers a LlmsSubtree so all leaves under RoutePrefix get split out into a dedicated {RoutePrefix}llms.txt. Multiple registrations are allowed; programmatic registrations override _meta.yml-discovered subtrees with the same prefix.
    
public static IServiceCollection AddLlmsSubtree(IServiceCollection services, LlmsSubtree subtree)
; }