docs: preparations for preview (#7267)

* configured base paths + added development banner

* fix typelist site url

* added navbar and sidebar badges

* configure algolia filters

* remove AI assistant

* remove unused imports

* change navbar text and badge

* lint fixes

* fix build error

* add to api reference rewrites

* fix build error

* fix build errors in user-guide

* fix feedback component

* add parent title to pagination

* added breadcrumbs component

* remove user-guide links

* resolve todos

* fix details about authentication

* change documentation title

* lint content
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-05-13 11:32:52 +03:00
1 parent 3e3b8a483f
commit 728c5ee53c
62 files changed
+855 -506

No files matched your search

+6 -32
View File
@@ -1,11 +1,6 @@
"use client"
import {
SearchProvider as UiSearchProvider,
AiAssistantCommandIcon,
AiAssistantProvider,
searchFilters,
} from "docs-ui"
import { SearchProvider as UiSearchProvider, searchFiltersV2 } from "docs-ui"
import { config } from "../config"
type SearchProviderProps = {
@@ -32,15 +27,15 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
title: "Getting started? Try one of the following terms.",
items: [
"Install Medusa with create-medusa-app",
"What is a Service?",
"What is an API route?",
"What is a Module?",
"What is a Workflow?",
],
},
{
title: "Developing with Medusa",
items: [
"How to create a Service",
"How to create a Module",
"How to create an API route",
"How to create a data model",
"How to create an admin widget",
@@ -48,32 +43,11 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
},
],
checkInternalPattern: new RegExp(
`^${config.baseUrl}/([^(api|ui|resources)]/)*`
`^${config.baseUrl}/v2/([^(resources)])*`
),
filterOptions: searchFilters,
filterOptions: searchFiltersV2,
}}
initialDefaultFilters={["docs"]}
commands={[
{
name: "ai-assistant",
icon: <AiAssistantCommandIcon />,
component: (
<AiAssistantProvider
apiUrl={process.env.NEXT_PUBLIC_AI_ASSISTANT_URL || "temp"}
websiteId={process.env.NEXT_PUBLIC_AI_WEBSITE_ID || "temp"}
recaptchaSiteKey={
process.env.NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY ||
"temp"
}
/>
),
title: "AI Assistant",
badge: {
variant: "purple",
children: "Beta",
},
},
]}
initialDefaultFilters={["book"]}
>
{children}
</UiSearchProvider>