Learn how the new Knowledge Base feature works.
This /docs knowledge base is "static", meaning there are the following route files:
app/routes/docs/($lang).tsx
app/routes/docs/($lang).categories.$category.tsx
app/routes/docs/($lang).articles.$article.tsx
And the knowledge base slug
is manually set. This means, there needs to be a knowledge base created with the knowlegeBase.slug = "docs"
and the knowlegeBase.basePath = "/"
.
app/routes/docs/($lang).tsx:
import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
import KbRoutesIndex from "~/modules/knowledgeBase/routes/views/KbRoutes.Index.View";
import { KbRoutesIndexApi } from "~/modules/knowledgeBase/routes/api/KbRoutes.Index.Api";
import ServerError from "~/components/ui/errors/ServerError";
export const meta: MetaFunction = ({ data }) => data?.metatags;
export const loader = (args: LoaderFunctionArgs) => KbRoutesIndexApi.loader(args, {
kbSlug: "docs"
});
export default () => <KbRoutesIndex />;
export function ErrorBoundary() {
return <ServerError />;
}
For all other knowledge bases, the basePath
needs to be /help
. And if you need a Help Center knowledge base, you would set the slug
as center
. This will result in a /help/center
route for the knowledge base.
You can change the hard-coded docs
and help
directories to fit your knowledge base needs.
We respect your privacy. We respect your privacy.
TLDR: We use cookies for language selection, theme, and analytics. Learn more. TLDR: We use cookies for language selection, theme, and analytics. Learn more