Compare commits

...

6 Commits

Author SHA1 Message Date
9c7ebe2567 chore(release): v2.3.23
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m17s
Build & Deploy / 🏗️ Build (push) Successful in 2m47s
Build & Deploy / 🚀 Deploy (push) Successful in 13s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m20s
Build & Deploy / 🔔 Notify (push) Successful in 1s
Nightly QA / 💨 Smoke & Health (push) Failing after 2m32s
2026-05-07 15:33:44 +02:00
81a532a888 fix(ui): change error description text color for light mode visibility
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 49s
Build & Deploy / 🏗️ Build (push) Successful in 1m52s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m2s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-07 13:49:09 +02:00
85797ccf73 fix(mdx): handle double curly braces serialization in MDX payload attributes
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 48s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
2026-05-07 12:07:45 +02:00
ac437e19f3 fix: refactor MDXContent to use getLocale and add missing blog blocks
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m16s
Build & Deploy / 🏗️ Build (push) Successful in 2m46s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m3s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-07 11:30:59 +02:00
5a61ebf269 fix: resolve Unknown Block technicalGrid by rendering blog/home components in MDXContent
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 52s
Build & Deploy / 🏗️ Build (push) Successful in 2m9s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-07 09:57:01 +02:00
6b8ae11e45 fix: remove admin from middleware matcher to ensure proper 404
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m19s
Build & Deploy / 🏗️ Build (push) Successful in 2m45s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m5s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-07 01:04:55 +02:00
7 changed files with 107 additions and 9 deletions

View File

@@ -49,7 +49,7 @@ export default function Error({
{t('title')}
</Heading>
<p className="text-white/60 mb-10 max-w-md text-lg">{t('description')}</p>
<p className="text-text-secondary mb-10 max-w-md text-lg">{t('description')}</p>
<div className="flex flex-col sm:flex-row gap-4">
<Button onClick={() => reset()} variant="saturated" size="lg">

View File

@@ -1,5 +1,27 @@
import React from 'react';
import { MDXRemote } from 'next-mdx-remote/rsc';
import { getLocale } from 'next-intl/server';
// Blog components
import TechnicalGrid from './blog/TechnicalGrid';
import Stats from './blog/Stats';
import VisualLinkPreview from './blog/VisualLinkPreview';
import StickyNarrative from './blog/StickyNarrative';
import ComparisonGrid from './blog/ComparisonGrid';
import HighlightBox from './blog/HighlightBox';
import ChatBubble from './blog/ChatBubble';
// Home components
import Hero from './home/Hero';
import ProductCategories from './home/ProductCategories';
import WhatWeDo from './home/WhatWeDo';
import RecentPosts from './home/RecentPosts';
import Experience from './home/Experience';
import WhyChooseUs from './home/WhyChooseUs';
import MeetTheTeam from './home/MeetTheTeam';
import GallerySection from './home/GallerySection';
import VideoSection from './home/VideoSection';
import CTA from './home/CTA';
function ContactSection(props: any) {
return (
<div className="p-8 border-2 border-dashed border-primary my-8 text-center text-primary font-bold">
@@ -17,10 +39,72 @@ function HeroSection(props: any) {
);
}
function Block(props: any) {
return (
<div className="p-4 border-2 border-dashed border-gray-300">Unknown Block: {props.type}</div>
);
async function Block(props: any) {
const { type, children } = props;
let { data } = props;
const locale = await getLocale();
// If data was passed as a JSON string (via our lib/blog.ts fix), parse it back
if (typeof data === 'string') {
try {
data = JSON.parse(data);
} catch (e) {
console.error('Failed to parse MDX block data:', e);
}
}
// Normalize type (Payload sometimes uses blockType in data)
const blockType = type || data?.blockType;
switch (blockType) {
// Blog Components
case 'technicalGrid':
return <TechnicalGrid {...data} />;
case 'stats':
return <Stats {...data} />;
case 'visualLinkPreview':
return <VisualLinkPreview {...data} />;
case 'stickyNarrative':
return <StickyNarrative {...data} />;
case 'comparisonGrid':
return <ComparisonGrid {...data} />;
case 'highlightBox':
return <HighlightBox {...data}>{children}</HighlightBox>;
case 'chatBubble':
return <ChatBubble {...data}>{children}</ChatBubble>;
// Home Components
case 'homeHero':
return <Hero data={data} />;
case 'homeProductCategories':
return <ProductCategories data={data} />;
case 'homeWhatWeDo':
return <WhatWeDo data={data} />;
case 'homeRecentPosts':
return <RecentPosts data={data} locale={locale} />;
case 'homeExperience':
return <Experience data={data} />;
case 'homeWhyChooseUs':
return <WhyChooseUs data={data} />;
case 'homeMeetTheTeam':
return <MeetTheTeam data={data} />;
case 'homeGallery':
return <GallerySection data={data} />;
case 'homeVideo':
return <VideoSection data={data} />;
case 'homeCTA':
return <CTA data={data} />;
default:
return (
<div className="p-8 border-2 border-dashed border-red-200 rounded-2xl my-8 bg-red-50 text-red-600">
<p className="font-bold mb-2">Unknown Block Type: {blockType}</p>
<pre className="text-xs overflow-auto p-4 bg-white/50 rounded">
{JSON.stringify({ type, data: !!data, hasChildren: !!children }, null, 2)}
</pre>
</div>
);
}
}
const components = {

View File

@@ -62,7 +62,13 @@ export async function getPostBySlug(slug: string, locale: string): Promise<PostD
const fileContent = await fs.readFile(filePath, 'utf-8');
const { data, content } = matter(fileContent);
let parsedContent = content;
// Fix MDX data props dropped by next-mdx-remote
// Payload serializes as data={{"items":...}} which Acorn treats as a Block statement.
const fixedContent = content.replace(/data=\{\{([\s\S]*?)\}\}/g, (match, p1) => {
return 'data="{' + p1.replace(/"/g, '&quot;') + '}"';
});
let parsedContent = fixedContent;
try {
if (content.trim().startsWith('{')) {
parsedContent = JSON.parse(content);

View File

@@ -113,7 +113,7 @@ export default async function middleware(request: NextRequest) {
export const config = {
matcher: [
'/((?!api|_next/static|_next/image|favicon.ico|admin|manifest.webmanifest|.*\\.(?:svg|png|jpg|jpeg|gif|webp|pdf|txt|vcf|xml|webm|mp4|map)$).*)',
'/((?!api|_next/static|_next/image|favicon.ico|manifest.webmanifest|.*\\.(?:svg|png|jpg|jpeg|gif|webp|pdf|txt|vcf|xml|webm|mp4|map)$).*)',
'/(de|en)/:path*',
],
};

2
next-env.d.ts vendored
View File

@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -113,7 +113,7 @@
"prepare": "husky",
"preinstall": "npx only-allow pnpm"
},
"version": "2.3.22-rc.19",
"version": "2.3.23",
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",

8
push_error.log Normal file
View File

@@ -0,0 +1,8 @@
remote:
remote: Create a new pull request for 'feature/mdx-migration':
remote: https://git.infra.mintel.me/mmintel/klz-cables.com/pulls/new/feature/mdx-migration
remote:
remote: . Processing 1 references
remote: Processed 1 references in total
To https://git.infra.mintel.me/mmintel/klz-cables.com.git
58092917..f17a8c8c feature/mdx-migration -> feature/mdx-migration