diff --git a/test/lexical-mdx/collections/Posts/shared.ts b/test/lexical-mdx/collections/Posts/shared.ts index f9ae83f424..b3b88a8fc6 100644 --- a/test/lexical-mdx/collections/Posts/shared.ts +++ b/test/lexical-mdx/collections/Posts/shared.ts @@ -1,5 +1,10 @@ -export const docsBasePath = '/Users/alessio/Documents/payloadcms-mdx-mock/docs' +import path from 'path' +import { fileURLToPath } from 'url' +export const docsBasePath = + typeof window === 'undefined' + ? path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../sampleDocs') + : null export const languages = { ts: 'TypeScript', plaintext: 'Plain Text', diff --git a/test/lexical-mdx/sampleDocs/test.mdx b/test/lexical-mdx/sampleDocs/test.mdx new file mode 100644 index 0000000000..fda737c21f --- /dev/null +++ b/test/lexical-mdx/sampleDocs/test.mdx @@ -0,0 +1,3 @@ +# You can write MDX here + +Write whatever content you want for testing purposes