# The ax block: what your project publishes to machines

URL: https://kywi-docs-production.up.railway.app/developing/the-ax-block-what-your-project-publishes-to-machines
Type: docPage

Six machine-facing surfaces are configured in one block — llms.txt, llms-full.txt, sitemap, robots, JSON-LD and markdown — and only markdown is off by default.

One `ax` block configures six surfaces. It is resolved once, at config time, into a fully-explicit object — every sub-block present, every default filled in — so no serve-time generator ever re-decides what a missing value meant. Which also means the shortest useful `ax` block is the one that overrides nothing.

ax: { markdown: { enabled: true }, // Absolute origin for sitemap/llms <loc> URLs. Wins outright over the // host-derived fallback (core 0.18.0), so cached AX bodies always carry the // canonical https origin regardless of which alias served the request. baseUrl: 'https://kywi-marketing-production.up.railway.app', },

## kywi.config.ts

## The block, surface by surface

Every ax surface is enabled unless you disable it, with one exception: markdown negotiation defaults to false, so a site that wants a .md twin of every page has to opt in. The other defaults — a 3600-second TTL, sitemap priority 0.5 and changefreq weekly, robots referencing both the sitemap and llms.txt — are the ones you are living with if you leave the block out.

## markdown: { enabled: true } is what turns on the .md twin

Without it, `GET /some/path.md` is a 404 and `Accept: text/markdown` gets HTML. It is off by default because a site that has not thought about it should not silently start serving a second representation of every page. What that representation contains is the integrator's subject — [AX surfaces as a machine-readable feed](/integrating/ax-surfaces-as-a-machine-readable-feed/).

## Curation is per surface, per content type

There is no global "exclude this type from everything" switch, and that is deliberate: a type worth a sitemap entry is often not worth a full-text dump. So `includeTypes`/`excludeTypes` are set on `llmsTxt` and `llmsFullTxt` independently, `sitemap` takes `excludeTypes` only, and `llmsFullTxt.maxItems` caps the projection by count rather than by type. `llmsTxt.sections` is the one place you order by hand — each entry is a heading plus either a list of content types or the name of a feed.

That is a statement about *types*, not individual pages. A single node still has one switch that removes it from every surface at once: `excludeFromSearch`, the same flag the admin's page settings expose, is checked before any per-surface filter runs. Reach for the `ax` block's `includeTypes`/`excludeTypes` to shape a whole content type, and `excludeFromSearch` on the node to hide one page everywhere.

## JSON-LD is the part that has to be code

A `jsonLd.types` entry maps one content type to a schema.org type, a field map, an optional FAQ source field, and a `transform` function that wins over all of it. That function is why the mapping cannot live in the admin: it is the escape hatch for a bespoke type, and it takes the node and a render context.

The document is built from the layout *this visitor was served*, after personalization arms are pruned — not from the stored layout. Building it from storage would ship the default arm's copy to a matched visitor through structured data, which is the same leak by a quieter route. See [What is public about a personalized page](/targeting/what-is-public-about-a-personalized-page/).

## Four routes, generated, in every mode

`llms.txt`, `llms-full.txt`, `sitemap.xml` and `robots.txt` are root routes the scaffold emits and [the upgrade command owns](/developing/upgrading-core-inside-your-project/) — stamped landmark files, so edit one and the next upgrade refuses it. Each is four lines that hand the path to the API handler:

// kywi-render v2 (create-kywi-app 0.23.0) sha256:68ab1c722743 import { createAxRoute } from '@kywi-software/core/next' import { kywi } from '../../lib/kywi' const route = createAxRoute({ runtime: kywi, axPath: 'llms.txt' }) /** Root-level `/llms.txt` — delegates to the core AX generator (kywi-cms#55). */ export const GET = route.GET export const dynamic = 'force-dynamic'

## app/llms.txt/route.ts

All four exist in headless and decoupled projects too, unlike the two `app/(site)` render routes: they are projections of published content for machines, not public HTML, so a project with no public front end still publishes them.
