feat: migrate Payload CMS to MDX and harden static infrastructure

This commit is contained in:
2026-05-04 14:48:04 +02:00
parent d51e220802
commit d3141187ee
165 changed files with 7654 additions and 16136 deletions

View File

@@ -0,0 +1,46 @@
import { describe, it, expect } from 'vitest';
import fs from 'fs';
import path from 'path';
const DE_JSON = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../messages/de.json'), 'utf-8'),
);
const EN_JSON = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../messages/en.json'), 'utf-8'),
);
describe('Translation Link Parity', () => {
it('should ensure the German termsSlug points to an existing MDX page', () => {
const slug = DE_JSON.Footer.termsSlug;
expect(slug).toBeTruthy();
const pagePath = path.resolve(__dirname, `../content/pages/${slug}.mdx`);
const exists = fs.existsSync(pagePath);
expect(exists).toBe(true);
});
it('should ensure the English termsSlug points to an existing MDX page', () => {
const slug = EN_JSON.Footer.termsSlug;
expect(slug).toBeTruthy();
const pagePath = path.resolve(__dirname, `../content/pages/${slug}.mdx`);
const exists = fs.existsSync(pagePath);
expect(exists).toBe(true);
});
it('should ensure privacyPolicySlug points to an existing MDX page for DE', () => {
const slug = DE_JSON.Footer.privacyPolicySlug;
expect(slug).toBeTruthy();
const pagePath = path.resolve(__dirname, `../content/pages/${slug}.mdx`);
expect(fs.existsSync(pagePath)).toBe(true);
});
it('should ensure privacyPolicySlug points to an existing MDX page for EN', () => {
const slug = EN_JSON.Footer.privacyPolicySlug;
expect(slug).toBeTruthy();
const pagePath = path.resolve(__dirname, `../content/pages/${slug}.mdx`);
expect(fs.existsSync(pagePath)).toBe(true);
});
});