docs: fix search not highlighting subheaders (#13619)
This commit is contained in:
@@ -97,9 +97,9 @@ After selecting the repository, you'll move on to the project configuration step
|
||||
|
||||
1. **Project name**: Enter the name of the project.
|
||||
2. **Project subdomain**: Enter a custom subdomain for the project. All projects are subdomains of `medusajs.app`.
|
||||
- For example, if you enter `my-project`, the project will be accessible at `my-project.medusajs.app`. Refer to the [subdomain restrictions](#subdomain-restrictions) section for more details.
|
||||
- For example, if you enter `my-project`, the project will be accessible at `my-project.medusajs.app`. Refer to the [subdomain restrictions](#subdomain-restrictions-for-projects) section for more details.
|
||||
3. You can expand the "Build details" section to optionally change its configurations:
|
||||
- **Region**: Select a [region](#available-regions-in-cloud) to deploy the project. For better performance, choose a region that's closer to your target users. The region can't be changed later.
|
||||
- **Region**: Select a [region](#available-regions-for-projects-in-cloud) to deploy the project. For better performance, choose a region that's closer to your target users. The region can't be changed later.
|
||||
- **Project root directory**: If your project is in a monorepo, specify the path to the Medusa project in the repository. Otherwise, leave it empty.
|
||||
4. You can expand the "Environment variables" section to optionally add environment variables:
|
||||
- Enter the key and value for each environment variable you want to add.
|
||||
@@ -160,7 +160,7 @@ Medusa supports hosting your Medusa projects on Cloud in the following regions:
|
||||
- Europe Central (`eu-central-1`)
|
||||
- Asia Southeast (`ap-southeast-1`)
|
||||
|
||||
For better performance, choose a region that's closer to your target users. If you need to host your Medusa project in a different region, contact support.
|
||||
All your project's deployments will be in the selected region. For better performance, choose a region that's closer to your target users. If you need to host your Medusa project in a different region, contact support.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export const generatedEditDates = {
|
||||
"app/page.mdx": "2025-09-11T11:20:20.775Z",
|
||||
"app/organization/page.mdx": "2025-06-12T14:43:20.772Z",
|
||||
"app/projects/page.mdx": "2025-09-09T06:45:36.785Z",
|
||||
"app/projects/page.mdx": "2025-09-29T12:03:35.689Z",
|
||||
"app/environments/page.mdx": "2025-06-25T08:00:05.550Z",
|
||||
"app/deployments/page.mdx": "2025-06-25T07:57:13.059Z",
|
||||
"app/organizations/page.mdx": "2025-09-11T14:26:31.848Z",
|
||||
|
||||
@@ -123,6 +123,25 @@ export const SearchHits = ({
|
||||
return checkInternalPattern.test(url)
|
||||
}
|
||||
|
||||
const getHierarchySnippetAttribute = (
|
||||
hit: (typeof hits)[0]
|
||||
): keyof HitType => {
|
||||
let prefix = "hierarchy."
|
||||
if (!hit._snippetResult?.hierarchy) {
|
||||
return (prefix + "lvl1") as keyof HitType
|
||||
}
|
||||
const entries = Object.entries(hit._snippetResult.hierarchy)
|
||||
const matchedLevel =
|
||||
entries.find(([, value]) => value.matchLevel === "full") ||
|
||||
entries.find(([, value]) => value.matchLevel === "partial")
|
||||
if (matchedLevel) {
|
||||
prefix += matchedLevel[0]
|
||||
} else {
|
||||
prefix += "lvl1"
|
||||
}
|
||||
return prefix as keyof HitType
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
@@ -162,7 +181,10 @@ export const SearchHits = ({
|
||||
)}
|
||||
>
|
||||
{/* @ts-expect-error React v19 doesn't see this type as a React element */}
|
||||
<Snippet attribute={"hierarchy.lvl1"} hit={item} />
|
||||
<Snippet
|
||||
attribute={getHierarchySnippetAttribute(item)}
|
||||
hit={item}
|
||||
/>
|
||||
</span>
|
||||
<span className="text-compact-small text-medusa-fg-subtle text-ellipsis overflow-hidden">
|
||||
{item.type === "content" && (
|
||||
|
||||
Reference in New Issue
Block a user