You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: local search, blog, PWA, CI, 404 page, and docs polish (#3)
* feat: local search, blog, PWA, CI, 404 page, and docs polish
Local search:
- Add @easyops-cn/docusaurus-search-local with hashed index, keyed to
the docs routeBasePath (/) so the search bar covers every page.
Blog / Changelog:
- Re-enable the blog preset as /changelog with RSS + Atom feeds.
- Ship one starter post announcing the docs refresh.
- Add "Changelog" link to the navbar.
PWA:
- Add @docusaurus/plugin-pwa with manifest.json, apple-touch-icon, and
mask-icon. swRegister is off for now to avoid cache surprises.
CI:
- New ci.yml that runs yarn build on every PR — catches MDX errors and
broken internal links before merge.
- New dependabot.yml to keep Docusaurus, Actions, and dev deps current.
Custom 404:
- Branded 404 page with three "go somewhere useful" tiles (Intro,
Getting Started, Commands) and links to the FAQ and support server.
Open Graph image:
- New 1200×630 SVG at static/img/og-image.svg matching the land theme.
OG and Twitter card metadata now point at it.
Favicon:
- Switch from the default Docusaurus favicon.ico to img/logo-mocha.svg.
Other polish:
- showLastUpdateAuthor enabled in docs preset.
- Copy-button CSS: visible border, gold hover accent, "copied" state.
- Admonitions on three pages: permissions info box in Getting Started,
edit-window warning in Messages, Manage Webhooks note in
Personalization.
* fix(ci): use bare yarn install for yarn v1 compatibility
yarn v1 doesn't accept --frozen-lockfile=false (it's not a valid flag
format). And since no lockfile is committed (.gitignore excludes *.lock),
the frozen-lockfile check would fail anyway. Match the existing
gh-pages.yml pattern: plain yarn.
title: Documentation Refresh — Tutorials, Dark Theme, Search
4
+
authors: [mocha-team]
5
+
tags: [docs, release]
6
+
description: We rebuilt the Mocha documentation site from the ground up — new tutorials, dark theme, local search, and every feature documented with examples and troubleshooting.
7
+
---
8
+
9
+
The Mocha documentation site just got a full refresh. Every feature is now documented, the theme matches the main mocha-bot.xyz site, and there's a proper tutorial track for people getting started with the bot.
10
+
11
+
<!-- truncate -->
12
+
13
+
## What's new
14
+
15
+
### Tutorials
16
+
17
+
There's a new **Tutorials** section with four step-by-step walkthroughs that take you from "I've never used this bot" to "I'm moderating a cross-server room":
18
+
19
+
-**[Getting Started](/tutorials/getting-started)** — invite the bot, set up permissions, create your first room.
20
+
-**[Connect Two Servers](/tutorials/connect-two-servers)** — bridge two Discord servers end-to-end with a test checklist.
21
+
-**[Share a Room via Invitation](/tutorials/share-via-invite)** — the full invitation flow with aliases, usage caps, and expiration.
Every slash command, chat behavior, and room feature now has its own reference page with:
27
+
28
+
- Exact parameters with types and whether they're required.
29
+
- What the bot does under the hood (without dragging in implementation details).
30
+
- A troubleshooting table for the errors you're most likely to hit.
31
+
- Cross-links so you can hop from a command to the concept behind it.
32
+
33
+
That includes `/feedback` (new), the full `/room invite` subcommand group, typing indicators, reply threading, pins, ratings, and personalization.
34
+
35
+
### Dark theme to match the main site
36
+
37
+
The docs site now uses the same visual language as [mocha-bot.xyz](https://mocha-bot.xyz): pure black background, Plus Jakarta Sans, gold accents, glass surfaces, blurred navbar. Dark mode is the only mode — no more accidental light-mode flashes when following links out of the main site.
38
+
39
+
### Local search
40
+
41
+
There's a search bar in the navbar now. It indexes every page at build time — no third-party service, no approval process, instant results.
42
+
43
+
### SEO and sharing
44
+
45
+
- Per-page Open Graph and Twitter card metadata so shared links render properly in Discord, Slack, and Twitter.
46
+
- A site-wide schema.org `WebSite` JSON-LD block plus the automatic `BreadcrumbList` structured data Docusaurus ships.
47
+
- A generated sitemap and a `robots.txt` pointing at it.
48
+
- A custom 404 page with links to the tutorials, commands reference, and FAQ.
49
+
50
+
### Under the hood
51
+
52
+
- Docusaurus v3 (up from v2 RC).
53
+
- PWA enabled — you can install the docs as an app.
54
+
- CI runs `yarn build` and link-checks every pull request.
55
+
- Dependabot watches for updates so nothing rots.
56
+
57
+
## What's next
58
+
59
+
If you spot something missing, wrong, or confusing, let us know via the in-bot `/feedback` command or drop a message in the [support server](https://discord.mocha-bot.xyz/). This site is living documentation — the more you tell us where it breaks, the better it gets.
Copy file name to clipboardExpand all lines: docs/chat/messages.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,10 @@ Editing a message edits its copies in every other channel in the room. There is
56
56
57
57
After the window expires the original edit will no longer propagate to followers.
58
58
59
+
:::warning
60
+
The window is measured from when the message was originally sent, not when you start editing. If you open the edit dialog just before the window closes and hit save a minute later, Mocha has already forgotten about the message and your change will only affect the original channel.
61
+
:::
62
+
59
63
## Delete Message
60
64
61
65
Deleting a message deletes every copy of it in the room, under the same time-window rules as editing.
Copy file name to clipboardExpand all lines: docs/rooms/personalization.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,10 @@ The room owner can toggle the flag later. Personalization requires the **Persona
30
30
- If the webhook is missing (for example, because the server didn't grant **Manage Webhooks**), Mocha falls back to a normal bot message with the standard `[ Server ][ user ] >>` prefix — nothing is lost.
31
31
- When a channel disconnects, its webhook is deleted.
32
32
33
+
:::note Needs "Manage Webhooks"
34
+
Personalization only works on servers where Mocha was granted **Manage Webhooks**. The fallback keeps the room functional for servers that didn't grant it, but those channels won't show per-user avatars. There's no warning — if you're running a mixed room, some sides will have personalization and others won't.
35
+
:::
36
+
33
37
## Things to know
34
38
35
39
- Per-user edits and deletes still work: Mocha tracks the webhook that sent each copy and edits/deletes via that webhook.
Copy file name to clipboardExpand all lines: docs/tutorials/getting-started.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,10 @@ This tutorial walks you through everything you need to get Mocha running in a Di
37
37
38
38
When you're done, the bot will show up in your server member list and be ready to receive slash commands.
39
39
40
+
:::info Why keep every permission?
41
+
Mocha's relay pipeline uses nearly every permission Discord exposes for a chat bot — cutting one usually breaks a subtle feature (personalization falls back to plain text, edits stop propagating, attachments get stripped). The safe default is to grant the full set.
0 commit comments