Files
llmgw/internal/web/templates/docs.html
T
Ilker ManapandClaude Opus 5.5 bd439aca29 A docs portal at /docs and a client developer's guide
The manual the binary carries, rendered on the client port: a sidebar of
the documents in the console's reading order (now one list, llmgw.Manual,
for both), heading anchors, links between documents kept in the portal and
links to files outside the binary sent to the repository, no script.
Public by default; landing.docs_sign_in sends visitors to sign in first.

docs/clients.md shows the official OpenAI and Anthropic SDKs against
llmgw in Python, TypeScript, Go and curl, with llmgw's headers; the
portal's index, the landing page and the account page link to it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 23:46:42 +02:00

68 lines
2.5 KiB
HTML

{{/* The docs portal: the manual the binary carries, as a website. No script
at all — a sidebar of links and a rendered document need none, and the
policy then has nothing to allow. */}}
{{define "docs"}}<!doctype html>
<html lang="en"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{if .Doc}}{{.Doc.Title}} · {{end}}llmgw docs</title>
<meta name="description" content="How to use and run llmgw: the client guide, installation, operation and the configuration reference.">
<link rel="stylesheet" href="{{stylesheet}}">
<link rel="stylesheet" href="{{asset "docs.css"}}">
</head><body><div class="wrap">
<header class="docs-head">
<p class="docs-brand"><a href="/docs">llmgw docs</a></p>
{{if .SignedIn}}{{template "nav" .Nav}}{{else}}
<nav class="menu" aria-label="Main">
<a href="/">This gateway</a>
<a href="/docs"{{if not .Doc}} aria-current="page"{{end}}>Docs</a>
<a href="/about">About llmgw</a>
{{if .SignIn}}<a href="/login">Sign in</a>{{end}}
</nav>{{end}}
</header>
<div class="docs">
<aside class="docs-side" aria-label="Documents">
<ul>
{{range .Docs}}
<li><a href="/docs/{{.Key}}"{{if and $.Doc (eq $.Doc.Key .Key)}} aria-current="page"{{end}}>{{.Title}}</a>
{{- if and $.Doc (eq $.Doc.Key .Key) $.Doc.Sections}}
<ul class="sections">{{range $.Doc.Sections}}
<li><a href="#{{.ID}}">{{.Title}}</a></li>{{end}}
</ul>
{{- end}}</li>
{{end}}
</ul>
</aside>
<main class="doc">
{{if .Doc}}
{{.Doc.Body}}
{{else}}
<h1>llmgw docs</h1>
<p class="sub">The manual this gateway's software carries — the same pages
<code>llmgw docs</code> prints and the console's Manual shows.</p>
{{with .Clients}}
<section class="docs-lead">
<h2>Using the gateway from code</h2>
<p>The official OpenAI and Anthropic SDKs work as they are: only the base URL
and the key change. <a href="/docs/{{.Key}}">{{.Title}}</a> shows Python,
TypeScript, Go and curl for chat, streaming, tools, embeddings, the Responses
API, batches, and what llmgw adds — stored conversations, tags, sessions and
memory notes.</p>
</section>
{{end}}
<h2>Every document</h2>
<ul class="docs-index">
{{range .Docs}} <li><a href="/docs/{{.Key}}">{{.Title}}</a></li>
{{end}}</ul>
<p class="note">The documents describe llmgw in general, not this installation:
they name no address, model or key of it.</p>
{{end}}
</main>
</div>
<footer><span><a href="/about">llmgw {{.Version}}</a></span><span><a href="/docs">docs</a></span></footer>
</div></body></html>{{end}}