Site: search over the documentation (#60) #84

Merged
twisla merged 1 commits from site-search into main 2026-10-07 17:06:10 +00:00
Owner

For #60: a search over the user guide, the how-tos, the FAQ and the developer docs.

  • /search/ holds its own index: one item for each page and each ## heading, with that part's text, written by Zola at build time. Nothing is fetched, the web server still only runs zola build, and the Content-Security-Policy needs no change.
  • js/search.js filters and ranks as you type. Every word must be in the part; headings count most; the guide, how-tos and FAQ rank before the developer docs, the milestones last. Results link to the heading, with the text around the match.
  • Without JavaScript the page is a list of every page and heading.
  • Navigation: a "Search" link, and a search box on the index pages of the guide, the how-tos and the developer docs (a plain form, no script).
  • The devlog is not searched.

Checked in Chromium with the production CSP on every response (no violation): several queries, typing, following a result to its heading, the small boxes, 390 px wide, JavaScript off. check_site.py: 72 pages, no problems; it follows every index link, so an entry can't point at a heading that doesn't exist.

Not checked: other browsers, a screen reader.

The search page is about 310 KB (under 100 KB compressed), loaded only by who searches.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT

For #60: a search over the user guide, the how-tos, the FAQ and the developer docs. - **`/search/`** holds its own index: one item for each page and each `##` heading, with that part's text, written by Zola at build time. Nothing is fetched, the web server still only runs `zola build`, and the Content-Security-Policy needs no change. - **`js/search.js`** filters and ranks as you type. Every word must be in the part; headings count most; the guide, how-tos and FAQ rank before the developer docs, the milestones last. Results link to the heading, with the text around the match. - **Without JavaScript** the page is a list of every page and heading. - **Navigation:** a "Search" link, and a search box on the index pages of the guide, the how-tos and the developer docs (a plain form, no script). - The devlog is not searched. **Checked** in Chromium with the production CSP on every response (no violation): several queries, typing, following a result to its heading, the small boxes, 390 px wide, JavaScript off. `check_site.py`: 72 pages, no problems; it follows every index link, so an entry can't point at a heading that doesn't exist. **Not checked:** other browsers, a screen reader. The search page is about 310 KB (under 100 KB compressed), loaded only by who searches. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-07 16:50:38 +00:00
Site: search over the documentation (#60)
Site / build (pull_request) Successful in 12s
834c6eb0f2
A search page whose index is the page itself: one item for each page and
each heading of the guide, the how-tos, the FAQ and the developer docs,
written by Zola from the pages' own content. A small script filters and
ranks them as you type. Nothing is fetched, so the Content-Security-Policy
needs nothing new; without JavaScript the page is a list of every heading.

The navigation gets a link, and the documentation's index pages a box that
is a plain form to /search/?q=. The devlog is not searched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla merged commit ae25cf0be2 into main 2026-10-07 17:06:10 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#84