fix: resolve translation routing bugs for MDX pages/posts, fix QA smoke tests, and automate target host network cleanup
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 56s
Build & Deploy / 🏗️ Build (push) Successful in 2m18s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 56s
Build & Deploy / 🏗️ Build (push) Successful in 2m18s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -2,6 +2,7 @@ import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import matter from 'gray-matter';
|
||||
import { config } from '@/lib/config';
|
||||
import { mapSlugToFileSlug } from './slugs';
|
||||
|
||||
export interface PageFrontmatter {
|
||||
title: string;
|
||||
@@ -47,7 +48,8 @@ function mapDoc(doc: any): PageData {
|
||||
|
||||
export async function getPageBySlug(slug: string, locale: string): Promise<PageData | null> {
|
||||
try {
|
||||
const filePath = path.join(process.cwd(), 'content', 'pages', `${slug}.mdx`);
|
||||
const fileSlug = await mapSlugToFileSlug(slug, locale);
|
||||
const filePath = path.join(process.cwd(), 'content', 'pages', `${fileSlug}.mdx`);
|
||||
const fileContent = await fs.readFile(filePath, 'utf-8');
|
||||
const { data, content } = matter(fileContent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user