hermes-agent/website
teknium1 a9d9634678
perf(docs-site): split search index by section and stop indexing code blocks
The client-side search index had grown to 16.3 MB raw / ~4.5 MB wire
(4,500+ docs), giving 25-30 s of blank UI before first results — users
read the dead window as 'search is broken entirely' (the engine itself
returned correct results).

Three levers, all config-only:

- searchContextByPaths: per-section index chunks. Searching from any
  docs page now fetches only that section's index (e.g. Reference:
  1.4 MB / 387 KB gz) instead of the 16 MB monolith. The search page
  gains a section dropdown; landing-page searches still cover
  everything via useAllContextsWithNoSearchContext.
- ignoreCssSelectors: ['pre']: fenced code blocks no longer indexed.
  YAML/shell samples were generating huge high-cardinality lunr token
  dictionaries; inline code in prose stays searchable.
- ignoreFiles: user-stories excluded (527 index docs of scraped
  community quotes rendered by a React component).

Measured (npm run build, both locales):
- root 'Everywhere' index: 16.3 MB -> 13.2 MB raw (4.42 -> 3.57 MB gz)
- per-section indexes: 0.4-8.3 MB raw (103 KB-2.2 MB gz)
- zh-Hans root: 14.6 -> 12.6 MB raw
- local serve: first dropdown results in ~175-205 ms for both scoped
  and Everywhere queries ('telegram' -> 8 options, search page -> 100)
2026-08-08 05:39:32 -07:00
..
docs chore(skills/github-issue-to-pr): de-router, fold in maintainer issue-to-PR discipline 2026-08-08 05:26:27 -07:00
i18n/zh-Hans/docusaurus-plugin-content-docs/current
scripts
src
static
.gitignore
.npmrc
README.md
docusaurus.config.ts perf(docs-site): split search index by section and stop indexing code blocks 2026-08-08 05:39:32 -07:00
package-lock.json
package.json perf(ci): build only en locale in docs-site-checks 2026-08-08 05:53:52 -04:00
sidebars.ts chore(skills/github-issue-to-pr): de-router, fold in maintainer issue-to-PR discipline 2026-08-08 05:26:27 -07:00
tsconfig.json

README.md

Website

This website is built using Docusaurus, a modern static website generator.

Installation

yarn

Local Development

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

USE_SSH=true yarn deploy

Not using SSH:

GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

Diagram Linting

CI runs ascii-guard to lint docs for ASCII box diagrams. Use Mermaid (````mermaid`) or plain lists/tables instead of ASCII boxes to avoid CI failures.