diff --git a/www/apps/api-reference/css/globals.css b/www/apps/api-reference/css/globals.css index 99a24f6932..855f4d0cea 100644 --- a/www/apps/api-reference/css/globals.css +++ b/www/apps/api-reference/css/globals.css @@ -50,11 +50,6 @@ body[data-modal="opened"] { @apply !overflow-hidden; } - - mark { - @apply bg-medusa-bg-highlight dark:bg-medusa-bg-highlight-dark; - @apply text-medusa-fg-interactive dark:text-medusa-fg-interactive-dark; - } } @layer utilities { diff --git a/www/apps/api-reference/vercel.json b/www/apps/api-reference/vercel.json index 768987b95b..cb560c77f6 100644 --- a/www/apps/api-reference/vercel.json +++ b/www/apps/api-reference/vercel.json @@ -7,5 +7,5 @@ "installCommand": "yarn install", "buildCommand": "turbo run build", "outputDirectory": ".next", - "ignoreCommand": "git diff HEAD^ HEAD --quiet -- ../../.." + "ignoreCommand": "bash ../../ignore-build-script.sh" } \ No newline at end of file diff --git a/www/apps/docs/src/css/custom.css b/www/apps/docs/src/css/custom.css index 641b43b316..b24050e094 100644 --- a/www/apps/docs/src/css/custom.css +++ b/www/apps/docs/src/css/custom.css @@ -6,11 +6,6 @@ body[data-modal="opened"] { @apply !overflow-hidden; } - - mark { - @apply bg-medusa-bg-highlight dark:bg-medusa-bg-highlight-dark; - @apply text-medusa-fg-interactive dark:text-medusa-fg-interactive-dark; - } } @layer components { diff --git a/www/apps/docs/vercel.json b/www/apps/docs/vercel.json index bde91e3344..94f3f13da7 100644 --- a/www/apps/docs/vercel.json +++ b/www/apps/docs/vercel.json @@ -486,6 +486,6 @@ "installCommand": "yarn install", "buildCommand": "turbo run build", "outputDirectory": "build", - "ignoreCommand": "git diff HEAD^ HEAD --quiet -- ../../..", + "ignoreCommand": "bash ../../ignore-build-script.sh", "devCommand": "yarn dev" } \ No newline at end of file diff --git a/www/apps/ui/src/app/(content)/opengraph-image.jpg b/www/apps/ui/src/app/opengraph-image.jpg similarity index 100% rename from www/apps/ui/src/app/(content)/opengraph-image.jpg rename to www/apps/ui/src/app/opengraph-image.jpg diff --git a/www/apps/ui/src/app/(content)/twitter-image.jpg b/www/apps/ui/src/app/twitter-image.jpg similarity index 100% rename from www/apps/ui/src/app/(content)/twitter-image.jpg rename to www/apps/ui/src/app/twitter-image.jpg diff --git a/www/apps/ui/src/components/figma-icon.tsx b/www/apps/ui/src/components/figma-icon.tsx index 97c8aa6475..083b16c4c1 100644 --- a/www/apps/ui/src/components/figma-icon.tsx +++ b/www/apps/ui/src/components/figma-icon.tsx @@ -1,6 +1,13 @@ import { BorderedIcon } from "docs-ui" -import { basePathUrl } from "@/lib/base-path-url" +import { Figma } from "./icons" export const FigmaIcon = () => { - return + return ( + + ) } diff --git a/www/apps/ui/src/components/icons.tsx b/www/apps/ui/src/components/icons.tsx new file mode 100644 index 0000000000..e9dc6ca147 --- /dev/null +++ b/www/apps/ui/src/components/icons.tsx @@ -0,0 +1,47 @@ +import { IconProps } from "@medusajs/icons/dist/types" + +export const Figma = (props: IconProps) => { + return ( + + + + + + + + + + + + + + + ) +} diff --git a/www/apps/ui/src/config/site.ts b/www/apps/ui/src/config/site.ts index 7758aefa3c..182cbc22f5 100644 --- a/www/apps/ui/src/config/site.ts +++ b/www/apps/ui/src/config/site.ts @@ -1,13 +1,11 @@ type SiteConfig = { name: string url: string - ogImage: string description: string } export const siteConfig: SiteConfig = { name: "Medusa UI", url: `${process.env.NEXT_PUBLIC_DOCS_URL}/ui`, - ogImage: `${process.env.NEXT_PUBLIC_DOCS_URL}/ui/images/medusa-og.png`, description: "Primitives for building Medusa applications.", } diff --git a/www/apps/ui/src/styles/globals.css b/www/apps/ui/src/styles/globals.css index 829833bc55..d9f04535b3 100644 --- a/www/apps/ui/src/styles/globals.css +++ b/www/apps/ui/src/styles/globals.css @@ -17,4 +17,8 @@ pre *::selection { @apply !bg-medusa-code-text-highlight; } + + body[data-modal="opened"] { + @apply !overflow-hidden; + } } diff --git a/www/apps/ui/vercel.json b/www/apps/ui/vercel.json index d12b1efc69..323833758c 100644 --- a/www/apps/ui/vercel.json +++ b/www/apps/ui/vercel.json @@ -3,5 +3,5 @@ "installCommand": "yarn install", "buildCommand": "turbo run build", "outputDirectory": ".next", - "ignoreCommand": "git diff HEAD^ HEAD --quiet -- ../../.." + "ignoreCommand": "bash ../../ignore-build-script.sh" } \ No newline at end of file diff --git a/www/ignore-build-script.sh b/www/ignore-build-script.sh new file mode 100644 index 0000000000..19431dfbc7 --- /dev/null +++ b/www/ignore-build-script.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "VERCEL_ENV: $VERCEL_ENV" +echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + +if [[ "$VERCEL_ENV" == "production" || "$VERCEL_GIT_COMMIT_REF" = "docs/"* ]] ; then + # Proceed with the build + echo "✅ - Build can proceed" + exit 1; +else + # Don't build + echo "🛑 - Build cancelled" + exit 0; +fi \ No newline at end of file diff --git a/www/packages/docs-ui/src/components/BorderedIcon/index.tsx b/www/packages/docs-ui/src/components/BorderedIcon/index.tsx index 732f3042eb..3af44e0b91 100644 --- a/www/packages/docs-ui/src/components/BorderedIcon/index.tsx +++ b/www/packages/docs-ui/src/components/BorderedIcon/index.tsx @@ -5,7 +5,8 @@ import { IconProps } from "@medusajs/icons/dist/types" export type BorderedIconProps = { icon?: string - IconComponent?: React.FC | null + IconComponent?: ((props: IconProps) => React.JSX.Element) | null + // IconComponent?: React.FC | null wrapperClassName?: string iconWrapperClassName?: string iconClassName?: string diff --git a/www/packages/docs-ui/src/components/Search/Hits/index.tsx b/www/packages/docs-ui/src/components/Search/Hits/index.tsx index 7ceda09481..5d1c77f8b7 100644 --- a/www/packages/docs-ui/src/components/Search/Hits/index.tsx +++ b/www/packages/docs-ui/src/components/Search/Hits/index.tsx @@ -126,7 +126,11 @@ export const SearchHits = ({ return ( Object.keys(item.hierarchy) .reverse() - .find((key) => item.hierarchy[key as Hierarchy] !== null) || "" + .find( + (key) => + item.hierarchy[key as Hierarchy] !== null && + item.hierarchy[key as Hierarchy] !== item.content + ) || "" ) } @@ -138,7 +142,13 @@ export const SearchHits = ({ } return ( -
+
{Object.keys(grouped).map((groupName, index) => ( @@ -172,11 +182,12 @@ export const SearchHits = ({ "hierarchy", item.type && item.type !== "content" ? item.type - : item.hierarchy.lvl1 - ? "lvl1" - : getLastAvailableHeirarchy(item), + : getLastAvailableHeirarchy(item) || + item.hierarchy.lvl1 || + "", ]} hit={item} + separator="." /> {item.type !== "lvl1" && ( diff --git a/www/packages/docs-ui/src/components/Search/Modal/index.tsx b/www/packages/docs-ui/src/components/Search/Modal/index.tsx index 8047c853da..25e54d8890 100644 --- a/www/packages/docs-ui/src/components/Search/Modal/index.tsx +++ b/www/packages/docs-ui/src/components/Search/Modal/index.tsx @@ -257,11 +257,13 @@ export const SearchModal = ({ "content", "hierarchy.lvl1", "hierarchy.lvl2", + "hierarchy.lvl3", ], attributesToHighlight: [ "content", "hierarchy.lvl1", "hierarchy.lvl2", + "hierarchy.lvl3", ], }} indices={algolia.indices}