Feat/help center - #30
Merged
Merged
Conversation
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…the dragged collection Signed-off-by: guoliim <guoliim@users.noreply.github.com>
… stale search Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…ctly Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…he page scroller Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…e shells Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…e computeds Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…s to it Signed-off-by: guoliim <guoliim@users.noreply.github.com>
…e in app code Signed-off-by: guoliim <guoliim@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds a Help Center module: an admin surface for writing and organizing articles, a public portal for readers, and full-text search across
both languages.
/dashboard/help) — collections and articles in two views (collections with inline articles, or a flat article list),drag-to-reorder, checkbox multi-select with bulk publish/unpublish, and title search that forces the flat view.
draft / Publish); a properties panel with the collection picker, timestamps and the article URL.
sticky two-level On this page table of contents with copyable heading anchors.
English dictionary, so both languages are searchable; title hits rank above body-only hits.
/help/{shortId}-{slug}, slug derived from the title (pinyin for Chinese) and refreshed when the title changes,with old slugs 301-ing to the current one. Canonical,
Article+BreadcrumbListJSON-LD, hreflang, and sitemap entries for publishedarticles only. Archived articles return 410, drafts and articles under a hidden collection return 404; both are
noindex.visibleflag rather than a draft state; hiding a collection hides its articles from readerswithout touching their published status, and the editor warns when that is the case.
67 commits, 51 files, +5720/-39. No new environment variables.
Why
FeedLog collects what users want but has nowhere to answer them. Teams running a public board end up repeating the same explanations in
comments, or sending people to a separate documentation tool that does not share the product's branding, domain or language settings. A
Help Center in the same portal lets a team answer once, link the answer from feedback threads, and keep readers on their own domain.
Closes #
How to review
Suggested reading order:
server/db/schemas/help.tsandserver/db/migrations/0012_strange_mindworm.sql— two tables,help_collectionandhelp_article.server/utils/help.ts— short id, slug generation (including the pinyin path) and the tsvector builder.server/api/admin/help/**thenserver/api/help/**— the admin and public halves of the API.app/pages/dashboard/help/**andapp/components/help/**— the admin UI.app/pages/help/**— the portal.Two things that look odd on purpose:
help_article.collection_idhas no foreign key. The cascade lives inserver/api/admin/help/collections/[id].delete.ts, whichdeletes the collection and its articles in one transaction, ordered so that an unauthorized delete 404s and rolls back before any article
is touched. This is deliberate, not an oversight.
only renders for the paginated one.
To try it locally: create a collection from New → New collection, add an article, publish it, then open
/helpon the same host.Search for a word that appears only in the body to exercise the ranking, and try a Chinese title to exercise the pinyin slug and bigram
index.
Checklist
git commit -s)pnpm build)pnpm generate:migration) and committedREADME.md/.env.example/docs/deploy/*updated