Skip to content

Commit 94d5aff

Browse files
localai-botmudler
andauthored
feat(website): split the site, move docs to /docs, add a landing page (#11243)
* feat(website): split the site, move docs to /docs, add a landing page The Hugo docs site has always been localai.io itself, which left nowhere to explain what LocalAI is or show what the team builds. This adds a separate marketing site at the root and moves the documentation under /docs/. Docs: The existing site keeps its content tree and its Relearn theme, and now builds with baseURL <root>/docs/. Its _index.md, which held a hand written landing page, becomes a real documentation home. Every previously published URL keeps working. GitHub Pages has no server side rewrites, so .github/ci/gen-redirects.sh walks the built docs output and leaves a meta refresh plus a canonical link at each old root path. It covers bare .html files too, which is what keeps /gallery.html alive, and it never overwrites a path the marketing site already owns. Website: A second Hugo site under website/ with its own layouts and no external theme, so the marketing side does not have to fight Relearn's home rooted menu and asset pipeline. CI builds both and merges them into one Pages artifact. The design is derived from the project logo rather than invented: the navy of the triangle, the cyan of the llama, the purple of the speed bars. Those offset bars became the motion signature. The background renders a real depth-anything.cpp depth map as contour lines and switches to a locate-anything.cpp style detection overlay over the engines section. Also included: an /engines/ index driven entirely by data/engines.yaml, a /blog/ section with five posts written from the release notes and the engine benchmark suites, install.sh and a Kubernetes manifest since the site advertises both, and a rule in .agents/ that release preparation now includes a blog post and demo clips. Every figure on the site is derived from the repository or the GitHub API, not from memory. Correcting them against their sources found one error in README.md: voxtral-tts.c is text to speech, not speech to text. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude Code:claude-opus-5 [Bash] [Edit] [Write] [Agent] * feat(website): add a star history chart, rewrite the history post in first person The history post read like a changelog written by a committee. It is now in Ettore's voice, first person, with the admissions left in. The numbers paragraph in particular read like a directory listing. It now says what the figures mean rather than which file they came from. Adds an interactive star history chart, built from the GitHub stargazers API rather than embedded from a third party, so the page makes no external request and cannot break when someone else's service is down. The four releases the post is organised around are marked on the curve, and the labels stack into rows because three of them land within two months of each other. The API stops paginating at 40,000 items, so the curve is measured up to December 2025 and the segment from there to today's total is drawn dashed, labelled as an estimate in the caption and in the tooltip. It is a straight line between two known points, and the chart says so rather than implying it is data. Also drops "marketing site" from the README heading and everywhere else it appeared, and calls it the main site instead. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude Code:claude-opus-5 [Bash] [Edit] [Write] --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
1 parent b13c429 commit 94d5aff

70 files changed

Lines changed: 3722 additions & 189 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/preparing-a-release.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Preparing a Release
2+
3+
A release is not finished when the tag is pushed. The GitHub release, the blog post and the demo clips ship together, because the changelog says what moved and the post and the clips are what make anyone care.
4+
5+
## What a release must include
6+
7+
1. **Labels on the merged PRs.** GitHub generates the raw notes from PR labels, so label first, generate second. Wrong labels mean a miscategorised changelog that has to be edited by hand.
8+
2. **`RELEASE_NOTES_vX.Y.Z.md`** at the repository root, in the house style: what changed, why it matters, PR numbers so people can read the diffs.
9+
3. **A blog post under `website/content/blog/`.** One post per release, front matter with `title`, `date`, `author`, `category: "Release"`, `tags`, `summary` and `extracss: ["blog.css"]`. Cover the two or three changes that alter what a user does day to day, not the whole changelog, and link the PR numbers. See `website/content/blog/what-landed-in-localai-4-8.md` for the shape.
10+
4. **Demo clips for the notable features.** Anything visible (a new backend, a UI change, a new endpoint, a measured speedup) gets a short screen recording. Put the file in `website/static/media/`, reference it from the blog post, and reuse it on the marketing pages where it fits.
11+
12+
A release without a post and without clips is incomplete, in the same way a user-facing code change without a docs update is incomplete.
13+
14+
## Clip conventions
15+
16+
- MP4, H.264, no audio track unless the feature is about audio. Keep them short (10 to 30 seconds) and loopable.
17+
- Record the real thing. A clip from the engine's own benchmark suite or a real session, never a mockup.
18+
- Where the change is a speedup, record both sides on the same machine on the same input, so the comparison is honest.
19+
- Name the file after the feature, not the release (`vllm-race.mp4`, not `v4-8-demo.mp4`), so it stays reusable once the release is old.
20+
- The marketing site plays clips with `muted loop playsinline preload="none"` and a `data-lazy` attribute, which the site's IntersectionObserver uses to play and pause them on scroll. Follow that pattern for anything you add.
21+
22+
## Order of work
23+
24+
Label the PRs, generate and edit the release notes, cut the draft release, record the clips while the branch is still fresh in your head, then write the post against the notes and the clips. Publishing the release and merging the post should happen on the same day.
25+
26+
The `creating-localai-releases` skill drives steps 1 to 3 and captures the React UI screenshots that go into the notes.

.github/ci/gen-redirects.sh

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Generate client-side redirects for the documentation URLs that used to live at
4+
# the site root.
5+
#
6+
# Until this site existed, the Hugo docs site WAS localai.io, so pages
7+
# were published at /features/..., /getting-started/..., /faq/ and so on. The
8+
# docs now build under /docs/, and GitHub Pages serves static files only: there
9+
# is no server-side rewrite, no .htaccess, no _redirects. The only way to keep
10+
# every published, bookmarked and search-indexed URL alive is to leave a real
11+
# HTML file at the old address that sends the browser to the new one.
12+
#
13+
# Anything the main site already publishes wins: it owns /, /engines/,
14+
# /blog/ and friends, so an existing file is never replaced.
15+
#
16+
# Usage: gen-redirects.sh <public-dir> [base-url]
17+
# public-dir merged output directory (main site with docs/ inside it)
18+
# base-url absolute or root-relative prefix the deployment is served from,
19+
# trailing slash optional (default "/")
20+
21+
set -euo pipefail
22+
23+
PUBLIC_DIR=${1:?usage: gen-redirects.sh <public-dir> [base-url]}
24+
BASE_URL=${2:-/}
25+
26+
# Normalise to exactly one trailing slash so concatenation below is predictable.
27+
BASE_URL="${BASE_URL%/}/"
28+
29+
DOCS_DIR="${PUBLIC_DIR}/docs"
30+
31+
if [ ! -d "$DOCS_DIR" ]; then
32+
echo "gen-redirects: no docs output at ${DOCS_DIR}" >&2
33+
exit 1
34+
fi
35+
36+
created=0
37+
skipped=0
38+
39+
# Every .html file is a reachable old URL, not just directory indexes: the
40+
# generated model gallery ships as a bare gallery.html and used to sit at the
41+
# root too.
42+
while IFS= read -r src; do
43+
rel=${src#"$DOCS_DIR"/}
44+
dst="${PUBLIC_DIR}/${rel}"
45+
46+
if [ -e "$dst" ]; then
47+
skipped=$((skipped + 1))
48+
continue
49+
fi
50+
51+
# Link to the directory, not to its index.html, so the redirect target is the
52+
# canonical URL the docs site itself advertises.
53+
target="${BASE_URL}docs/${rel%index.html}"
54+
55+
mkdir -p "$(dirname "$dst")"
56+
printf '%s' '<!doctype html>
57+
<html lang="en">
58+
<head>
59+
<meta charset="utf-8">
60+
<title>Moved</title>
61+
<link rel="canonical" href="'"$target"'">
62+
<meta name="robots" content="noindex">
63+
<meta http-equiv="refresh" content="0; url='"$target"'">
64+
</head>
65+
<body>
66+
<p>This page moved to <a href="'"$target"'">'"$target"'</a>.</p>
67+
</body>
68+
</html>
69+
' > "$dst"
70+
71+
created=$((created + 1))
72+
done <<EOF
73+
$(find "$DOCS_DIR" -type f -name '*.html' | sort)
74+
EOF
75+
76+
echo "gen-redirects: ${created} redirect(s) written, ${skipped} path(s) left to the main site"

.github/workflows/gh-pages.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
name: Deploy docs to GitHub Pages
1+
name: Deploy site to GitHub Pages
22

33
on:
44
push:
55
branches:
66
- master
77
paths:
88
- 'docs/**'
9+
- 'website/**'
910
- 'gallery/**'
1011
- 'images/**'
1112
- '.github/ci/modelslist.go'
13+
- '.github/ci/gen-redirects.sh'
1214
- '.github/workflows/gh-pages.yml'
1315
workflow_dispatch:
1416

@@ -49,19 +51,36 @@ jobs:
4951
id: pages
5052
uses: actions/configure-pages@v6
5153

54+
# The gallery page is generated from the model index and shipped as a
55+
# static asset of the docs site, so it has to exist before Hugo runs.
5256
- name: Generate gallery
5357
run: go run ./.github/ci/modelslist.go ./gallery/index.yaml > docs/static/gallery.html
5458

55-
- name: Build site
59+
# Two Hugo sites, one Pages artifact: the main site owns the root,
60+
# the docs site is nested under /docs/.
61+
- name: Build the main site
62+
working-directory: website
63+
run: hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
64+
65+
- name: Build documentation site
5666
working-directory: docs
5767
run: |
5868
mkdir -p layouts/_default
59-
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
69+
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/docs/"
70+
71+
- name: Merge documentation into the main site
72+
run: |
73+
mkdir -p website/public/docs
74+
cp -R docs/public/. website/public/docs/
75+
76+
# Keeps the pre-split URLs alive; see the script header.
77+
- name: Generate legacy URL redirects
78+
run: .github/ci/gen-redirects.sh website/public "${{ steps.pages.outputs.base_url }}/"
6079

6180
- name: Upload artifact
6281
uses: actions/upload-pages-artifact@v5
6382
with:
64-
path: docs/public
83+
path: website/public
6584

6685
deploy:
6786
environment:

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ prepare
6262
/ggml-metal.metal
6363
docs/static/gallery.html
6464

65+
# Hugo build output and lock files (docs/ and website/)
66+
docs/public/
67+
website/public/
68+
.hugo_build.lock
69+
6570
# Protobuf generated files
6671
*.pb.go
6772
*pb2.py

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ LocalAI follows the Linux kernel project's [guidelines for AI coding assistants]
3232
| [.agents/adding-gallery-models.md](.agents/adding-gallery-models.md) | Adding GGUF models from HuggingFace to the model gallery |
3333
| [.agents/localai-assistant-mcp.md](.agents/localai-assistant-mcp.md) | LocalAI Assistant chat modality — adding admin tools to the in-process MCP server, editing skill prompts, keeping REST + MCP + skills in sync |
3434
| [.agents/backend-signing.md](.agents/backend-signing.md) | Backend OCI image signing (keyless cosign + sigstore-go) — producer-side CI setup, consumer-side gallery `verification:` block, strict mode (`LOCALAI_REQUIRE_BACKEND_INTEGRITY`), revocation via `not_before` |
35+
| [.agents/preparing-a-release.md](.agents/preparing-a-release.md) | Cutting a release: PR labels, `RELEASE_NOTES_vX.Y.Z.md`, the blog post under `website/content/blog/`, and the demo clips under `website/static/media/` |
3536

3637
## Quick Reference
3738

@@ -42,6 +43,7 @@ LocalAI follows the Linux kernel project's [guidelines for AI coding assistants]
4243
- **Docs (docs-with-code rule)**: When you change user-facing behavior (API endpoints, CLI flags, config keys, or features), update the corresponding page under `docs/content/` in the SAME change, not as a follow-up. A user-facing change without a matching docs update is incomplete. See also the documentation conventions in [.agents/coding-style.md](.agents/coding-style.md).
4344
- **New API endpoints**: LocalAI advertises its capability surface in several independent places — swagger `@Tags`, `/api/instructions` registry, auth `RouteFeatureRegistry`, React UI `capabilities.js`, docs. Read [.agents/api-endpoints-and-auth.md](.agents/api-endpoints-and-auth.md) and follow its checklist — missing any surface means clients, admins, and the UI won't know the endpoint exists.
4445
- **Admin endpoints → MCP tool**: every admin endpoint that an admin would manage conversationally (install/list/edit/toggle/upgrade) MUST also be exposed as an MCP tool in `pkg/mcp/localaitools/`. The LocalAI Assistant chat modality and the standalone `local-ai mcp-server` consume that package; drift between REST and MCP is a real risk. Read [.agents/localai-assistant-mcp.md](.agents/localai-assistant-mcp.md) — the `TestToolHTTPRouteMappingComplete` test fails until you wire the new tool and update the route map.
46+
- **Releases ship with a post and clips**: a release is not done at the tag. It needs labelled PRs, `RELEASE_NOTES_vX.Y.Z.md`, a blog post under `website/content/blog/`, and a short demo clip in `website/static/media/` for each notable feature. See [.agents/preparing-a-release.md](.agents/preparing-a-release.md).
4547
- **Build**: Inspect `Makefile` and `.github/workflows/` — ask the user before running long builds
4648
- **Backend OS coverage**: a new backend must target every OS it can build for, not just Linux. `.github/backend-matrix.yml` has two matrices — `include:` (Linux) and `includeDarwin:` (macOS / Apple Silicon). Most C/C++/GGML and many Python backends build on Darwin too — wire the `includeDarwin` entry + `backend/index.yaml` `metal:` entries, or say in the PR why an OS is unsupported. See the darwin checklist in [.agents/adding-backends.md](.agents/adding-backends.md).
4749
- **Gallery variant ranking**: a gallery entry can declare `variants` (alternative builds of the same weights), and LocalAI ranks the ones a host can run by engine preference first, size second. A new backend that should be preferred on some hardware must be listed in `engineNamePreferenceRules` in `pkg/system/capabilities.go`; the sibling `backendBuildTagPreferenceRules` speaks build tags rather than engine names, and using the wrong table matches nothing without erroring. See [.agents/adding-backends.md](.agents/adding-backends.md).

Makefile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,12 @@ swagger:
15481548
gen-assets:
15491549
$(GOCMD) run core/dependencies_manager/manager.go webui_static.yaml core/http/static/assets
15501550

1551-
## Documentation
1551+
## Documentation and website
1552+
# The published site is two Hugo sites: website/ owns the root, docs/ is nested
1553+
# under /docs/. Serve them separately while editing; use `make site` to get the
1554+
# merged tree (including the legacy URL redirects) that GitHub Pages deploys.
1555+
SITE_BASE_URL?=http://localhost:8000
1556+
15521557
docs/layouts/_default:
15531558
mkdir -p docs/layouts/_default
15541559

@@ -1560,12 +1565,30 @@ docs/public: docs/layouts/_default docs/static/gallery.html
15601565

15611566
docs-clean:
15621567
rm -rf docs/public
1568+
rm -rf website/public
15631569
rm -rf docs/static/gallery.html
15641570

15651571
.PHONY: docs
15661572
docs: docs/static/gallery.html
15671573
cd docs && hugo serve
15681574

1575+
.PHONY: website
1576+
website:
1577+
cd website && hugo serve
1578+
1579+
.PHONY: site
1580+
site: docs/static/gallery.html
1581+
rm -rf website/public docs/public
1582+
cd website && hugo --minify --baseURL "$(SITE_BASE_URL)/"
1583+
cd docs && hugo --minify --baseURL "$(SITE_BASE_URL)/docs/"
1584+
mkdir -p website/public/docs
1585+
cp -R docs/public/. website/public/docs/
1586+
./.github/ci/gen-redirects.sh website/public "$(SITE_BASE_URL)/"
1587+
1588+
.PHONY: site-serve
1589+
site-serve: site
1590+
cd website/public && python3 -m http.server 8000
1591+
15691592
########################################################
15701593
## Platform-specific builds
15711594
########################################################

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Most backends wrap a best-in-class upstream engine. A handful of them are native
238238
| [magpie-tts.cpp](https://github.com/mudler/magpie-tts.cpp) | C++/GGML port of NVIDIA's Magpie TTS Multilingual 357M: 22.05 kHz mono text-to-speech in 5 voices and 9+ languages, with the NanoCodec neural codec and tokenizer/G2P embedded in a single GGUF |
239239
| [ced.cpp](https://github.com/localai-org/ced.cpp) | C++/GGML port of the CED audio-tagging models: sound-event classification (527-class AudioSet) over REST and the realtime API for live recognition |
240240
| [voice-detect.cpp](https://github.com/localai-org/voice-detect.cpp) | Speaker recognition and voice analysis (ECAPA-TDNN, WeSpeaker, ERes2Net, CAM++, wav2vec2 age/gender/emotion), replacing the Python speaker-recognition backend |
241-
| [voxtral-tts.c](https://github.com/mudler/voxtral-tts.c) | Voxtral Realtime 4B speech-to-text in pure C |
241+
| [voxtral-tts.c](https://github.com/mudler/voxtral-tts.c) | Mistral Voxtral-4B-TTS text-to-speech in pure C: 20 preset voices across 9 languages, 24 kHz WAV output, no dependencies beyond libc |
242242
| [vibevoice.cpp](https://github.com/mudler/vibevoice.cpp) | Native port of Microsoft VibeVoice for TTS (voice cloning) and long-form ASR with speaker diarization |
243243
| [rf-detr.cpp](https://github.com/localai-org/rf-detr.cpp) | Native RF-DETR object detection and instance segmentation |
244244
| [locate-anything.cpp](https://github.com/mudler/locate-anything.cpp) | Open-vocabulary object detection and visual grounding (LocateAnything-3B) |

0 commit comments

Comments
 (0)