2026-03-25 09:27:12 +08:00
import { defineConfig } from "vitepress" ;
2026-04-08 00:53:26 +08:00
import llmstxt from "vitepress-plugin-llms" ;
2026-05-10 20:15:44 +08:00
import pkg from "../package.json" ;
2026-03-22 21:00:37 +08:00
export default defineConfig ({
2026-04-24 14:46:23 +08:00
title : "SnapOtter" ,
2026-04-20 17:03:17 +08:00
description :
2026-05-16 10:02:19 +08:00
"Documentation for SnapOtter - A Self Hosted Image Manipulator. 52 tools, local AI, pipelines, REST API." ,
2026-04-24 14:23:05 +08:00
base : "/" ,
2026-04-24 18:02:21 +08:00
appearance : { initialValue : "light" },
2026-03-25 09:27:12 +08:00
srcDir : "." ,
outDir : "./.vitepress/dist" ,
2026-03-27 13:53:25 +08:00
ignoreDeadLinks : [ /localhost/ ],
2026-03-22 21:00:37 +08:00
2026-05-16 12:48:02 +08:00
sitemap : { hostname : "https://docs.snapotter.com" },
2026-03-26 22:51:49 +08:00
head : [
[ "meta" , { name : "theme-color" , content : "#3b82f6" }],
2026-05-10 21:49:56 +08:00
[ "link" , { rel : "icon" , type : "image/png" , sizes : "48x48" , href : "/favicon.png" }],
[ "link" , { rel : "icon" , type : "image/x-icon" , href : "/favicon.ico" }],
[ "link" , { rel : "apple-touch-icon" , sizes : "180x180" , href : "/apple-touch-icon.png" }],
2026-04-24 18:02:21 +08:00
[ "link" , { rel : "llms-txt" , href : "/llms.txt" }],
2026-05-16 12:48:02 +08:00
[ "meta" , { property : "og:type" , content : "website" }],
[ "meta" , { property : "og:site_name" , content : "SnapOtter Docs" }],
[ "meta" , { property : "og:image" , content : "https://docs.snapotter.com/og-image.png" }],
[ "meta" , { property : "og:image:width" , content : "1280" }],
[ "meta" , { property : "og:image:height" , content : "640" }],
[ "meta" , { property : "og:image:alt" , content : "SnapOtter - Self-Hosted Image Processing" }],
[ "meta" , { property : "og:locale" , content : "en_US" }],
[ "meta" , { name : "twitter:card" , content : "summary_large_image" }],
2026-05-18 16:39:54 +08:00
[ "meta" , { name : "twitter:site" , content : "@SnapOtterHQ" }],
2026-05-16 12:48:02 +08:00
[ "meta" , { name : "twitter:image" , content : "https://docs.snapotter.com/og-image.png" }],
2026-03-26 22:51:49 +08:00
],
2026-03-22 21:00:37 +08:00
2026-05-18 16:39:54 +08:00
transformHead ({ pageData }) {
const head : Array < [ string , Record < string , string >] > = [];
const canonicalUrl = `https://docs.snapotter.com/ ${ pageData . relativePath . replace ( /(^|\/)index\.md$/ , "$1" ). replace ( /\.md$/ , "" ) } ` ;
head . push ([ "meta" , { property : "og:url" , content : canonicalUrl }]);
head . push ([ "meta" , { property : "og:title" , content : pageData.title }]);
if ( pageData . description ) {
head . push ([ "meta" , { property : "og:description" , content : pageData.description }]);
head . push ([ "meta" , { name : "twitter:description" , content : pageData.description }]);
}
head . push ([ "meta" , { name : "twitter:title" , content : pageData.title }]);
return head ;
},
2026-04-08 00:53:26 +08:00
vite : {
plugins : [
llmstxt ({
2026-04-24 18:02:21 +08:00
domain : "https://docs.snapotter.com" ,
2026-04-08 00:53:26 +08:00
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
2026-04-24 18:02:21 +08:00
- [GitHub](https://github.com/snapotter-hq/snapotter)
2026-04-08 00:53:26 +08:00
- License: AGPLv3 (commercial license also available)
` ,
customTemplateVariables : {
description :
2026-05-16 10:02:19 +08:00
"SnapOtter is a self-hosted, open-source image processing platform with 52 tools including AI/ML. Runs in a single Docker container with GPU auto-detection." ,
2026-04-08 00:53:26 +08:00
details :
"Resize, compress, convert, remove backgrounds, upscale, run OCR, and more - without sending images to external services." ,
},
}),
],
},
2026-03-22 21:00:37 +08:00
themeConfig : {
2026-04-24 14:46:23 +08:00
logo : "/logo.png" ,
2026-03-27 20:52:06 +08:00
2026-03-22 21:00:37 +08:00
nav : [
2026-03-25 09:27:12 +08:00
{ text : "Home" , link : "/" },
{ text : "Guide" , link : "/guide/getting-started" },
{ text : "API Reference" , link : "/api/rest" },
2026-05-18 16:39:54 +08:00
{ text : "Changelog" , link : "/changelog" },
2026-05-10 20:15:44 +08:00
{
text : `v ${ pkg . version } ` ,
2026-05-18 16:39:54 +08:00
link : "/changelog" ,
2026-05-10 20:15:44 +08:00
},
2026-03-22 21:00:37 +08:00
],
sidebar : [
{
2026-03-25 09:27:12 +08:00
text : "Guide" ,
2026-03-22 21:00:37 +08:00
items : [
2026-03-25 09:27:12 +08:00
{ text : "Getting started" , link : "/guide/getting-started" },
{ text : "Architecture" , link : "/guide/architecture" },
{ text : "Configuration" , link : "/guide/configuration" },
2026-05-13 19:17:14 +08:00
{ text : "OIDC / SSO" , link : "/guide/oidc" },
2026-03-25 09:27:12 +08:00
{ text : "Database" , link : "/guide/database" },
{ text : "Deployment" , link : "/guide/deployment" },
2026-05-08 00:26:56 +08:00
{ text : "Supported Formats" , link : "/guide/supported-formats" },
2026-04-23 20:50:38 +08:00
{ text : "Hardware requirements" , link : "/guide/deployment#hardware-requirements" },
2026-04-05 00:23:21 +08:00
{ text : "Docker tags" , link : "/guide/docker-tags" },
2026-03-28 12:14:24 +08:00
{ text : "Developer guide" , link : "/guide/developer" },
{ text : "Translation guide" , link : "/guide/translations" },
2026-04-16 16:40:53 +08:00
{ text : "Contributing" , link : "/guide/contributing" },
2026-03-25 09:27:12 +08:00
],
2026-03-22 21:00:37 +08:00
},
{
2026-03-25 09:27:12 +08:00
text : "API reference" ,
2026-03-22 21:00:37 +08:00
items : [
2026-03-25 09:27:12 +08:00
{ text : "REST API" , link : "/api/rest" },
{ text : "Image engine" , link : "/api/image-engine" },
{ text : "AI engine" , link : "/api/ai" },
],
},
2026-05-18 16:39:54 +08:00
{
text : "Project" ,
items : [{ text : "Changelog" , link : "/changelog" }],
},
2026-03-22 21:00:37 +08:00
],
search : {
2026-03-25 09:27:12 +08:00
provider : "local" ,
2026-03-22 21:00:37 +08:00
},
footer : {
2026-04-13 16:23:07 +08:00
message :
2026-04-24 18:02:21 +08:00
'Released under the <a href="https://github.com/snapotter-hq/snapotter/blob/main/LICENSE">AGPLv3 License</a>.' ,
2026-03-27 17:10:50 +08:00
copyright :
2026-04-24 18:02:21 +08:00
'AI-friendly docs available at <a href="/llms.txt">/llms.txt</a> · <a href="/llms-full.txt">/llms-full.txt</a>' ,
2026-03-22 21:00:37 +08:00
},
2026-05-01 16:13:38 +08:00
socialLinks : [
{ icon : "github" , link : "https://github.com/snapotter-hq/snapotter" },
{ icon : "discord" , link : "https://discord.gg/hr3s7HPUsr" },
],
2026-03-22 21:00:37 +08:00
editLink : {
2026-04-24 18:02:21 +08:00
pattern : "https://github.com/snapotter-hq/snapotter/edit/main/apps/docs/:path" ,
2026-03-25 09:27:12 +08:00
text : "Edit this page on GitHub" ,
},
},
});