Version Packages (integrations/makeswift)#2864
Open
github-actions[bot] wants to merge 1 commit intointegrations/makeswiftfrom
Open
Version Packages (integrations/makeswift)#2864github-actions[bot] wants to merge 1 commit intointegrations/makeswiftfrom
integrations/makeswift)#2864github-actions[bot] wants to merge 1 commit intointegrations/makeswiftfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
16bc230 to
b2de5e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to integrations/makeswift, this PR will be updated.
Releases
@bigcommerce/catalyst-makeswift@1.4.3
Patch Changes
#2862
52207b6Thanks @Codeseph! - fix: handle OPTIONS requests via MakeswiftApiHandler#2860
5097034Thanks @jorgemoya! - Add explicit Makeswift SEO metadata support to public-facing pages. When configured in Makeswift, the SEO title and description will take priority over the default values from BigCommerce or static translations.The following pages now support Makeswift SEO metadata:
/)/[...rest])/product/[slug])/brand/[slug])/category/[slug])/blog)/blog/[blogId])/search)/cart)/compare)/gift-certificates)/gift-certificates/balance)/webpages/[id]/contact)/webpages/[id]/normal)Migration steps
Step 1: Add
getMakeswiftPageMetadatafunctionAdd the
getMakeswiftPageMetadatafunction tocore/lib/makeswift/client.ts:Export the function from
core/lib/makeswift/index.ts:export { Page } from './page'; - export { client } from './client'; + export { client, getMakeswiftPageMetadata } from './client';Step 2: Update page metadata
Each page's
generateMetadatafunction has been updated to fetch Makeswift metadata and use it as the primary source, falling back to existing values. Here's an example using the cart page:Update
core/app/[locale]/(default)/cart/page.tsx:import { getPreferredCurrencyCode } from '~/lib/currency'; + import { getMakeswiftPageMetadata } from '~/lib/makeswift'; import { Slot } from '~/lib/makeswift/slot';export async function generateMetadata({ params }: Props): Promise<Metadata> { const { locale } = await params; const t = await getTranslations({ locale, namespace: 'Cart' }); + const makeswiftMetadata = await getMakeswiftPageMetadata({ path: '/cart', locale }); return { - title: t('title'), + title: makeswiftMetadata?.title || t('title'), + description: makeswiftMetadata?.description || undefined, }; }Apply the same pattern to the other pages listed above, using the appropriate path for each page (e.g.,
/blog,/search,/compare, etc.).