Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ If a CI pipeline or automated tool checks for the sitemap URL during a local pre
This docs site is deployed as a GitHub Pages **project site** under `/gh-aw/` (see `base: '/gh-aw/'` in `astro.config.mjs`).

- `robots.txt` is served at `/gh-aw/robots.txt`
- `llms.txt` is served at `/gh-aw/llms.txt`
- AI discovery file is served at `/gh-aw/.well-known/ai.txt`
- AI metadata files are served under `/gh-aw/ai/`

Expand Down
1 change: 1 addition & 0 deletions docs/src/components/CustomHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ const filteredHead = head.filter(({ tag, attrs }) => {
/>

<link rel="icon" type="image/svg+xml" href="/gh-aw/favicon.svg" />
<link rel="alternate" type="text/plain" title="LLMs.txt" href="/gh-aw/llms.txt" />

<!-- Responsive tables enhancement script -->
<script>
Expand Down
32 changes: 20 additions & 12 deletions docs/src/pages/llms.txt.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
import type { APIRoute } from 'astro';
import { getAwPrompts } from './_aw-prompts.js';

export const GET: APIRoute = () => {
const prompts = getAwPrompts();
export const prerender = true;

export const GET: APIRoute = () => {
const lines = [
'# GitHub Agentic Workflows',
'',
'> Agent-optimised prompt files for GitHub Agentic Workflows (gh-aw).',
'> These markdown files are designed for AI agents and LLMs, not human readers.',
'> Documentation index for GitHub Agentic Workflows (gh-aw).',
'> Canonical docs: https://github.github.com/gh-aw/',
'',
'## Documentation',
'',
'- [Home](https://github.github.com/gh-aw/)',
'- [Quick Start](https://github.github.com/gh-aw/setup/quick-start/)',
'- [CLI Commands](https://github.github.com/gh-aw/setup/cli/)',
'- [Guides](https://github.github.com/gh-aw/guides/agentic-authoring/)',
'- [Reference](https://github.github.com/gh-aw/reference/)',
'- [Patterns](https://github.github.com/gh-aw/patterns/daily-ops/)',
'- [Examples](https://github.github.com/gh-aw/examples/maintaining-repos/)',
'- [Sitemap](https://github.github.com/gh-aw/sitemap-index.xml)',
'',
'## Agent Prompts',
'## AI Discovery',
'',
...prompts.map(({ file, description, rawUrl }) => {
const label = file.replace(/\.md$/, '');
return description
? `- [${label}](${rawUrl}): ${description}`
: `- [${label}](${rawUrl})`;
}),
'- [robots.txt](https://github.github.com/gh-aw/robots.txt)',
'- [ai.txt](https://github.github.com/gh-aw/.well-known/ai.txt)',
'- [agents.txt](https://github.github.com/gh-aw/agents.txt)',
'- [llms-full.txt](https://github.github.com/gh-aw/llms-full.txt)',
];

return new Response(lines.join('\n'), {
Expand Down