KnowX Knowledge Base
A searchable knowledge base for EmDash: categories, article feedback, and a report of what readers search for.
Plugin
KnowX Knowledge Base
A searchable knowledge base for EmDash: categories, article feedback, and a report of what readers search for.
Description
KnowX turns an EmDash site into a help center. Visitors search for an answer, browse topics, and say whether an article helped. You see which searches find nothing and which articles get more No votes than Yes.
What you get
- Help home. A search box and topic cards. When you have more than one top-level category, each card shows a name, a short description and an icon you pick.
- Articles. Table of contents, copy-link on headings, copy on code, previous and next, last updated date, optional version badge.
- Search. EmDash’s own search, limited to the content types you tick. Instant results as you type, plus a results page. Each result says what kind of content it is.
- FAQ. Its own page, with FAQ data for search engines.
- Was this helpful. Yes or No on each article. After a No you can ask for a short comment.
- Still need help. A contact button after an empty search and after a No vote. You set one link. Hidden when that setting is empty.
- Insights and Searches. Weak articles by name, comments as plain text, top searches, searches that found nothing.
- Dashboard card. Empty searches this week, and the least helpful article.
How it fits together
KnowX is the engine: routes, storage and the admin screens. An EmDash plugin cannot add pages to your site, so the public pages ship as a site kit you copy in once. See Installation.
Guests search, read, and vote when the host gives EmDash the visitor’s address (Cloudflare, or trustedProxyHeaders). Elsewhere guests see a sign-in link to vote, and members vote as usual.
Installation
Before you install
1. Your site needs a sandbox runner. Registry plugins run in a sandbox. Until the site has one, Admin, Plugins shows “No plugins configured” and there is no Registry in the menu.
- Node: in your site, run
npm install @emdash-cms/sandbox-workerd workerd, then addsandboxRunner: "@emdash-cms/sandbox-workerd/sandbox",insideemdash()inastro.config.mjs. - Cloudflare: add
import from "@emdash-cms/cloudflare";andsandboxRunner: sandbox(),. It needs the Workers Paid plan, theworker_loadersbinding namedLOADER(uncomment it in your Wrangler config) and an R2 bucket asstorage: r2(...), or the install stops with “Storage error while installing plugin”. Then runnpm run deploy.
Stop the dev server and start it again. Registry now shows in the admin menu.
2. The plugin is the engine. Visitor pages come from its site kit. A registry plugin cannot add pages to your site. Until you copy the kit, its addresses (for example /docs/) show your site’s 404 page. That is expected. The kit copy below takes one command.
3. You need Node 22.16 or later for the npx emdash seed step.
Checked on EmDash 1.3.1 with the blog template, on Node and on Cloudflare Workers (registry install).
Install
-
Admin, Registry, search KnowX, Install, then accept the permissions.
-
From your site’s root folder:
kit="$(mktemp -d)" && git clone --depth 1 \ --branch v0.2.1 \ https://github.com/wbcomdesigns/emdash-knowx \ "$kit/emdash-knowx" && "$kit/emdash-knowx/scripts/add-to-site.sh" . -
Restart the dev server.
-
In Admin, Menus, add
/docs/and/docs/faq/. -
Open KnowX, Insights, then add articles in Content, Help articles.
Run step 2 again after every update. Guide: https://github.com/wbcomdesigns/emdash-knowx/blob/v0.2.1/docs/website/getting-started/install.md
FAQ
Why is /docs/ a 404 after install?
The plugin cannot create pages. Run the two kit lines from the Installation tab, then restart the dev server.
Votes or search log fail after a registry install?
Copy the current site kit. Older kits called /plugins/knowx/ only. A registry install uses a generated id. The current kit tries that id, then the name.
Can guests vote and search?
Search and reading, always. Voting, when the host gives EmDash the visitor’s address (Cloudflare, or trustedProxyHeaders); elsewhere guests see a sign-in link and members vote.
Does search look through posts and pages? Only the content types you tick on Settings. Help articles are on by default. A type with search turned off in its collection will not return results.
Does it send email? No. The contact button is a link you set: a page, an http(s) address, or a mailto address.
Does it work in dark mode? Yes. The kit colours follow your site theme.
Is there a paid version? No. Everything here is free.
Can I put a search box inside an article? Not from the registry install. That needs a trusted install, and it is not part of this release.
Changelog
0.2.1
After updating from 0.1.x, Insights shows its upgrade progress until it is done.
- Fix - Insights no longer shows “None yet” while votes from 0.1.x are still being brought over.
- Fix - A Yes or No click before the page script loads is kept and sent. Copy the kit again.
0.2.0
Every help page, vote, search and admin screen now fits Cloudflare’s limit of 10 requests per plugin call.
- New - Each article keeps running Yes and No counts, updated with the vote.
- New - A Searches screen holds Top searches and Searches with no results.
- New - Data from 0.1.x is brought over a step at a time as Insights opens.
- Improve - Was this helpful answers clicks at once and shows the vote is being sent. Copy the kit again.
- Fix - On Cloudflare a vote no longer shows “Something went wrong” after it was saved.
- Fix - On Cloudflare Insights, Settings and their actions no longer fail on a busy site.
- Fix - The setup card says where to create the content types on a site without SQLite.
0.1.5
- Security: guests vote and searches are counted only when the host gives EmDash the visitor’s address; elsewhere guests sign in to vote. Search log capped at 5000 terms.
- New: one command copies the kit and creates the content types. Insights shows a Set up visitor pages card, and Top searches has find and paging.
- Fix: Insights counts every search and vote; help pages line up with the theme frame; dark mode buttons pass 4.5:1.
Older versions: https://github.com/wbcomdesigns/emdash-knowx/blob/main/CHANGELOG.md
To copy the kit for this version, from your site’s root folder:
kit="$(mktemp -d)" &&
git clone --depth 1 \
--branch v0.2.1 \
https://github.com/wbcomdesigns/emdash-knowx \
"$kit/emdash-knowx" &&
"$kit/emdash-knowx/scripts/add-to-site.sh" .