API / @aihu/seo

@aihu/seo

App & routing

DEPRECATED compatibility shim over @aihu-plugin/agent-readiness (sitemap.xml, robots.txt, llms.txt, JSON-LD).

version
1.0.1
exports
8
values
3
types
5
01

createSeoRoutes

function
function createSeoRoutes(config: SeoConfig): SeoRoutes

Create typed RouteHandler objects for SEO routes.

02

seo

function
function seo(config: SeoConfig)
03

seoLlmsSections

const
const seoLlmsSections
04

RobotsOptions

interface
interface RobotsOptions {
  readonly disallowAiBots?: boolean // legacy default when absent: true (deny-all)
  readonly additionalRules?: ReadonlyArray<{
    userAgent: string
    allow?: string[]
    disallow?: string[]
  }>
}
05

SeoConfig

interface
interface SeoConfig {
  readonly siteName: string
  readonly baseUrl: string // e.g., 'https://example.com' (no trailing slash)
  readonly sitemapSources?: ReadonlyArray<SitemapSource>
  readonly jsonLdDefaults?: Partial<JsonLdPage>
  readonly robotsOptions?: RobotsOptions
}
06

SeoRoutes

interface
interface SeoRoutes {
  readonly sitemapXml: RouteHandler
  readonly robotsTxt: RouteHandler
  readonly llmsTxt: RouteHandler
}
07

SitemapSource

interface
interface SitemapSource {
  readonly path: string // e.g., '/about', '/docs/getting-started'
  readonly lastmod?: string // ISO date
  readonly changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'
  readonly priority?: number // 0.0–1.0
}
08

JsonLdPage

type
type JsonLdPage