docs: change navbar items + breadcrumb improvements (#9209)

- Add a new commerce module navbar item
- Rename Learning Resources to Development Resources (in navbar and across documentation content)
- Improve breadcrumbs to show categories / subcategories

Preview: https://resources-docs-git-docs-navbar-changes-medusajs.vercel.app/v2/resources
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-09-22 12:47:35 +00:00
1 parent 0bce09f0a2
commit 138523a629
24 files changed
+146 -39

No files matched your search

@@ -20,7 +20,7 @@ While you can start playing around with Medusa and customize it, it's highly rec
## Helpful Resources Guides
The [Learning Resources](!resources!) documentation provides more helpful guides and references for your development journey.
The [Development Resources](!resources!) documentation provides more helpful guides and references for your development journey.
Some of these guides and references are:
@@ -33,6 +33,6 @@ Some of these guides and references are:
## More Examples in Recipes
In the Learning Resources documentation, you'll also find step-by-step guides of different use cases, such as building a marketplace, digital products, and more.
In the Development Resources documentation, you'll also find step-by-step guides of different use cases, such as building a marketplace, digital products, and more.
Refer to the [Recipes](!resources!/recipes) documentation to learn more.
@@ -72,7 +72,7 @@ This runs your Medusa application and runs the tests available under the `src/in
## Other Options and Inputs
Refer to [this reference in the Learning Resources documentation](!resources!/test-tools-reference/medusaIntegrationTestRunner) for other available parameter options and inputs of the `testSuite` function.
Refer to [this reference in the Development Resources documentation](!resources!/test-tools-reference/medusaIntegrationTestRunner) for other available parameter options and inputs of the `testSuite` function.
---
@@ -80,7 +80,7 @@ Refer to [this reference in the Learning Resources documentation](!resources!/te
The `medusaIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end.
To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Learning Resources documentation](!resources!/test-tools-reference/medusaIntegrationTestRunner).
To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Development Resources documentation](!resources!/test-tools-reference/medusaIntegrationTestRunner).
---
@@ -121,7 +121,7 @@ moduleIntegrationTestRunner<HelloModuleService>({
### Other Options and Inputs
Refer to [this reference in the Learning Resources documentation](!resources!/test-tools-reference/moduleIntegrationTestRunner) for other available parameter options and inputs of the `testSuite` function.
Refer to [this reference in the Development Resources documentation](!resources!/test-tools-reference/moduleIntegrationTestRunner) for other available parameter options and inputs of the `testSuite` function.
---
@@ -129,4 +129,4 @@ Refer to [this reference in the Learning Resources documentation](!resources!/te
The `moduleIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end.
To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Learning Resources documentation](!resources!/test-tools-reference/moduleIntegrationTestRunner).
To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Development Resources documentation](!resources!/test-tools-reference/moduleIntegrationTestRunner).
+2 -2
View File
@@ -4,6 +4,6 @@ export const metadata = {
# {metadata.title}
The Learning Resources documentation provides guides and references that are useful for your development. This documentation included links to parts of the Learning Resources documentation where necessary.
The Development Resources documentation provides guides and references that are useful for your development. This documentation included links to parts of the Development Resources documentation where necessary.
Check out the Learning Resources documentation [here](!resources!).
Check out the Development Resources documentation [here](!resources!).
+1 -1
View File
@@ -25,7 +25,7 @@ If you think this is a mistake, please [report this issue on GitHub](https://git
icon: BookOpen
},
{
title: "Learning Resources",
title: "Development Resources",
href: "!resources!",
icon: AcademicCapSolid
},
+1 -1
View File
@@ -104,5 +104,5 @@ By the end of this documentation, you’ll be an expert Medusa developer, leadin
The documentation for Medusa v2 is split into the following sections:
1. The main documentation, which is the one you're currently viewing. It's highly recommended to follow all the chapters in this documentation before jumping into other documentation sections.
2. The [Learning Resources documentation](!resources!) provides guides and resources useful during your development, such as tools, API references, recipes, step-by-step guides and examples, and more.
2. The [Development Resources documentation](!resources!) provides guides and resources useful during your development, such as tools, API references, recipes, step-by-step guides and examples, and more.
3. The [Store](!api!/store) and [Admin](!api!/admin) API references provide a reference to the Medusa application's endpoints and instructions related to authentication, parameter types, and more.
@@ -10,7 +10,7 @@ You're free to choose how to build your storefront. You can start with our Next.
<Note title="Tip">
To learn how to build a storefront from scratch, check out the [Storefront Development guides](!resources!/storefront-development) in the Learning Resources documentation.
To learn how to build a storefront from scratch, check out the [Storefront Development guides](!resources!/storefront-development) in the Development Resources documentation.
</Note>
+3
View File
@@ -51,6 +51,9 @@ export const MainNavProvider = ({ children }: MainNavProviderProps) => {
navItems={navigationDropdownItems}
reportIssueLink={reportLink}
editDate={editDate}
breadcrumbOptions={{
showCategories: false,
}}
>
{children}
</UiMainNavProvider>
@@ -20,7 +20,7 @@ The workspace has the following two directories:
- `apps`: this directory holds the different documentation websites and projects.
- `book`: includes the codebase for the Medusa Book. It's built with [Next.js 14](https://nextjs.org/).
- `resources`: includes the codebase for the Medusa Learning Resources documentation. It's built with [Next.js 14](https://nextjs.org/).
- `resources`: includes the codebase for the Medusa Development Resources documentation. It's built with [Next.js 14](https://nextjs.org/).
- `api-reference`: includes the codebase for the API reference website. It's built with [Next.js 14](https://nextjs.org/).
- `ui`: includes the codebase for the Medusa UI documentation website. It's built with [Next.js 14](https://nextjs.org/).
- `packages`: this directory holds the shared packages and components necessary for the development of the projects in the `apps` directory.
@@ -37,7 +37,7 @@ All documentation projects are built with Next.js. The content is writtin in MDX
The content of the Medusa Book is placed under the `www/apps/book/app` directory.
### Medusa Learning Resources Content
### Medusa Development Resources Content
The content of the Medusa Resources documentation is placed under the `www/apps/resources/app` directory.
+1 -1
View File
@@ -14,7 +14,7 @@ export const metadata: Metadata = {
default: config.titleSuffix || "",
},
description:
"Explore Medusa's recipes, API references, configurations, and more.",
"Explore Medusa's recipes, API references, configurations, storefront guides, and more.",
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+1 -1
View File
@@ -25,7 +25,7 @@ If you think this is a mistake, please [report this issue on GitHub](https://git
icon: BookOpen
},
{
title: "Learning Resources",
title: "Development Resources",
href: "!resources!",
icon: AcademicCapSolid
},
+1 -1
View File
@@ -23,7 +23,7 @@ import {
BuildingsSolid
} from "@medusajs/icons"
# Medusa Learning Resources
# Medusa Development Resources
Explore Medusa's commerce modules, SDKs, configurations, recipes, and more.
+1 -1
View File
@@ -5,7 +5,7 @@ import { generatedSidebar } from "../generated/sidebar.mjs"
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
titleSuffix: "Medusa Learning Resources",
titleSuffix: "Medusa Development Resources",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebar: {
+6 -2
View File
@@ -23,10 +23,14 @@ export const MainNavProvider = ({ children }: MainNavProviderProps) => {
() =>
getNavDropdownItems({
basePath: config.baseUrl,
activePath: basePathUrl(),
activePath: basePathUrl(
pathname.startsWith("/commerce-modules")
? "/commerce-modules"
: undefined
),
version: "v2",
}),
[]
[pathname]
)
const reportLink = useMemo(
+1 -1
View File
@@ -25,7 +25,7 @@ If you think this is a mistake, please [report this issue on GitHub](https://git
icon: BookOpen
},
{
title: "Learning Resources",
title: "Development Resources",
href: "!resources!",
icon: AcademicCapSolid
},
+1 -1
View File
@@ -35,7 +35,7 @@ export default function NotFound() {
icon: BookOpen,
},
{
title: "Learning Resources",
title: "Development Resources",
href: "!resources!",
icon: AcademicCapSolid,
},
+1 -1
View File
@@ -25,7 +25,7 @@ If you think this is a mistake, please [report this issue on GitHub](https://git
icon: BookOpen
},
{
title: "Learning Resources",
title: "Development Resources",
href: "!resources!",
icon: AcademicCapSolid
},