mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(docs): auto-generate llms.txt via vitepress-plugin-llms
Replace static llms.txt and llms-full.txt with auto-generated versions that stay in sync with docs on every build. The plugin also generates per-page .md files for individual page fetching by LLMs.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
import llmstxt from "vitepress-plugin-llms";
|
||||
|
||||
export default defineConfig({
|
||||
title: "Stirling Image",
|
||||
@@ -14,6 +15,45 @@ export default defineConfig({
|
||||
["link", { rel: "llms-txt", href: "/stirling-image/llms.txt" }],
|
||||
],
|
||||
|
||||
vite: {
|
||||
plugins: [
|
||||
llmstxt({
|
||||
domain: "https://stirling-image.github.io",
|
||||
customLLMsTxtTemplate: `# {title}
|
||||
|
||||
{description}
|
||||
|
||||
{details}
|
||||
|
||||
## Docs
|
||||
|
||||
{toc}
|
||||
|
||||
## API Quick Reference
|
||||
|
||||
- Base URL: \`http://localhost:1349\`
|
||||
- Auth: Session token via \`POST /api/auth/login\` or API key (\`Authorization: Bearer si_...\`)
|
||||
- Tools: \`POST /api/v1/tools/{toolId}\` (multipart: file + settings JSON)
|
||||
- Batch: \`POST /api/v1/tools/{toolId}/batch\` (multiple files, returns ZIP)
|
||||
- Pipelines: \`POST /api/v1/pipeline/execute\` (chain tools sequentially)
|
||||
- Interactive API docs on running instance: \`/api/docs\`
|
||||
- OpenAPI spec on running instance: \`/api/v1/openapi.yaml\`
|
||||
|
||||
## Source
|
||||
|
||||
- [GitHub](https://github.com/stirling-image/stirling-image)
|
||||
- License: AGPLv3 (commercial license also available)
|
||||
`,
|
||||
customTemplateVariables: {
|
||||
description:
|
||||
"Self-hosted, open-source image processing platform with 30+ tools. Runs in a single Docker container. Available as :latest (full, ~11 GB with AI/ML) or :lite (~1.5 GB, image processing only).",
|
||||
details:
|
||||
"Resize, compress, convert, remove backgrounds, upscale, run OCR, and more - without sending images to external services.",
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
themeConfig: {
|
||||
logo: "/logo.svg",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user