Files
commonflow.org/src/pages/llms.txt.ts
Jim Myhrberg ee0c0171a5 feat: add llms.txt and rename raw spec URL to match filename
- Add /llms.txt endpoint following llmstxt.org specification format
- Change raw markdown URL from /spec/{version}/raw.md to
  /spec/git-common-flow-v{version}.md to match download filename
- Add <link rel="alternate"> for raw markdown in spec pages
- Add Raw button to markdown view page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:04:56 +00:00

26 lines
787 B
TypeScript

import type { APIRoute } from "astro";
import { getVersionInfo } from "../utils/versions";
export const GET: APIRoute = async () => {
const { currentVersion } = await getVersionInfo();
const content = `# Common-Flow
> A Git workflow specification combining GitHub Flow with versioned releases.
Common-Flow is a sensible git workflow based on GitHub Flow, with the addition
of versioned releases, optional release branches, and without the requirement
to deploy to production all the time.
## Docs
- [Git Common-Flow Specification](/spec/git-common-flow-v${currentVersion}.md): The complete Git Common-Flow v${currentVersion} specification in Markdown format
`;
return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
},
});
};