You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e16d8f1
Browse filesBrowse the repository at this point in the historyBrowse files
- add @agentmarkup/next as a first-party adapter alongside core, vite, and astro
- support build-time llms.txt, llms-full.txt, markdown mirrors, _headers, robots.txt, and JSON-LD processing for Next.js output
- harden core and Next output handling with config validation, _headers sanitization, path-containment checks, and added regression coverage
- improve adapter reliability across Vite and Astro and document Next’s dynamic-SSR boundary clearly
- align package metadata and bump core, vite, astro, and next to 0.4.0
Copy file name to clipboardExpand all lines: README.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,32 @@
1
1
# agentmarkup
2
2
3
-
Build-time `llms.txt`, optional `llms-full.txt`, JSON-LD, markdown mirrors, AI crawler controls, and validation for Viteand Astro websites.
3
+
Build-time `llms.txt`, optional `llms-full.txt`, JSON-LD, markdown mirrors, AI crawler controls, and validation for Vite, Astro, and Next.js websites.
4
4
5
5
## What This Repo Contains
6
6
7
7
-`packages/core` — the framework-agnostic engine used by adapters and manual pipelines
8
8
-`packages/vite` — the publishable `@agentmarkup/vite` adapter
9
9
-`packages/astro` — the publishable `@agentmarkup/astro` adapter
10
+
-`packages/next` — the publishable `@agentmarkup/next` adapter
10
11
-`website` — the dogfooding landing page built against the workspace package boundary
11
12
-`examples/vite-react` — a minimal example app for local verification and onboarding
12
13
13
14
## Quick Start
14
15
16
+
Choose the adapter that owns your final output:
17
+
18
+
-`@agentmarkup/vite` for Vite
19
+
-`@agentmarkup/astro` for Astro
20
+
-`@agentmarkup/next` for Next.js
21
+
15
22
```bash
16
23
pnpm add -D @agentmarkup/vite
24
+
# or: pnpm add -D @agentmarkup/astro
25
+
# or: pnpm add -D @agentmarkup/next
17
26
```
18
27
28
+
Vite example:
29
+
19
30
```ts
20
31
import { defineConfig } from'vite';
21
32
importreactfrom'@vitejs/plugin-react';
@@ -73,7 +84,7 @@ On build, the adapters can:
73
84
- validate JSON-LD already present in page HTML
74
85
- emit page-level `.md` mirrors from final HTML output when a cleaner agent-facing fetch path is useful
75
86
- patch or create `robots.txt` with AI crawler directives
76
-
- patch or create `_headers` with `Content-Signal` and canonical `Link` headers for markdown mirrors
87
+
- patch or create `_headers`, or merge server header rules, with `Content-Signal` and canonical `Link` headers for markdown mirrors
77
88
- report deterministic validation warnings and errors in the terminal, including markdown alternate-link and mirror-coverage issues
78
89
79
90
By default, agentmarkup coexists with existing machine-readable assets. If a site already has a curated `llms.txt`, matching crawler rules, or hand-authored JSON-LD for a schema type, those are preserved unless you explicitly opt into replacement.
@@ -84,9 +95,11 @@ If your site already has a custom prerender or post-build step, `@agentmarkup/co
84
95
85
96
`@agentmarkup/vite` is best when Vite owns the final HTML files. Meta-frameworks that render or prerender final HTML after Vite's build phases may still benefit from `llms.txt` and `robots.txt`, but they usually need either `@agentmarkup/core` in the final output step or a dedicated adapter to guarantee JSON-LD reaches the deployed HTML.
86
97
98
+
`@agentmarkup/next` is best when Next owns the final build output. Static export gets the full post-build file flow, prerendered and server deployments still get generated assets plus header integration, but fully dynamic SSR routes are still a per-route integration point: if Next does not emit build-time HTML for that route, use the re-exported `@agentmarkup/core` helpers directly inside app code.
99
+
87
100
## Current Features
88
101
89
-
- Viteand Astro adapters
102
+
- Vite, Astro, and Next.js adapters
90
103
-`llms.txt` generation
91
104
- optional `llms-full.txt` generation
92
105
- automatic `llms.txt` discovery-link injection
@@ -110,7 +123,7 @@ pnpm typecheck
110
123
pnpm build
111
124
```
112
125
113
-
Package details live in [packages/vite/README.md](./packages/vite/README.md), [packages/astro/README.md](./packages/astro/README.md), and [packages/core/README.md](./packages/core/README.md).
126
+
Package details live in [packages/vite/README.md](./packages/vite/README.md), [packages/astro/README.md](./packages/astro/README.md), [packages/next/README.md](./packages/next/README.md), and [packages/core/README.md](./packages/core/README.md).
114
127
Contribution guidelines live in [CONTRIBUTING.md](./CONTRIBUTING.md).
115
128
116
129
Website deploys are manual via `./deploy/website-deploy.sh`.
@@ -122,7 +135,7 @@ This repo includes a repo-local Codex skill at `.agents/skills/agentmarkup-audit
122
135
Use it to:
123
136
124
137
- determine final-output ownership
125
-
- recommend `@agentmarkup/vite`, `@agentmarkup/astro`, or `@agentmarkup/core`
138
+
- recommend `@agentmarkup/vite`, `@agentmarkup/astro`, `@agentmarkup/next`, or `@agentmarkup/core`
126
139
- audit `llms.txt`, `llms-full.txt`, JSON-LD, `robots.txt`, `_headers`, and markdown mirrors
127
140
- compare a site or repo against the same expectations used by the website checker
128
141
@@ -131,7 +144,7 @@ This skill is repo tooling, not part of the published package runtime surface.
131
144
Example prompt:
132
145
133
146
```text
134
-
Use the repo-local agentmarkup-audit skill on this repo or site. Determine who owns the final HTML, audit llms.txt, llms-full.txt, JSON-LD, robots.txt, _headers, and tell me whether markdown mirrors plus @agentmarkup/vite, @agentmarkup/astro, or @agentmarkup/core are the right fit.
147
+
Use the repo-local agentmarkup-audit skill on this repo or site. Determine who owns the final HTML, audit llms.txt, llms-full.txt, JSON-LD, robots.txt, _headers, and tell me whether markdown mirrors plus @agentmarkup/vite, @agentmarkup/astro, @agentmarkup/next, or @agentmarkup/core are the right fit.
Copy file name to clipboardExpand all lines: packages/astro/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
Build-time `llms.txt`, optional `llms-full.txt`, JSON-LD, markdown mirrors, AI crawler `robots.txt`, headers, and validation for Astro websites.
4
4
5
+
`@agentmarkup/astro` is the Astro adapter in the `agentmarkup` package family. Framework-agnostic helpers live in `@agentmarkup/core`, Vite sites use `@agentmarkup/vite`, and Next.js sites use `@agentmarkup/next`.
Copy file name to clipboardExpand all lines: packages/core/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ pnpm add -D @agentmarkup/core
12
12
13
13
`@agentmarkup/core` is for adapter authors and for sites that already own a custom prerender or post-build pipeline.
14
14
15
+
The package family also includes dedicated adapters for Vite, Astro, and Next.js when those frameworks own enough of the final build output.
16
+
15
17
The helpers are coexistence-friendly: `patchRobotsTxt()` leaves matching manual crawler rules untouched, and adapters built on core can preserve curated `llms.txt` files or existing JSON-LD by default.
16
18
17
19
When `markdownPages.enabled` is on, `generateLlmsTxt()` prefers same-site markdown mirror URLs for page entries by default so agents discover the cleaner fetch path first. This is usually most useful when the raw HTML is thin or noisy. Set `llmsTxt.preferMarkdownMirrors: false` to keep HTML URLs in `llms.txt`.
0 commit comments