Update codebase to enhance debugging and improve user interface

The codebase has been updated throughout to improve debugging capabilities notably in the PostgresDatabaseWebhookVerifierService and create-reader modules. User interface has also been enhanced in the marketing layout and blog page. Minor reordering of entries in email-templates and adjustment of configurations in turbo.json has also been performed.
This commit is contained in:
giancarlo
2024-05-02 01:16:50 +07:00
parent a161af1624
commit 65e8dab1b2
10 changed files with 50 additions and 15 deletions

View File

@@ -9,10 +9,14 @@ export async function createKeystaticReader() {
switch (STORAGE_KIND) {
case 'local': {
if (process.env.NEXT_RUNTIME === 'nodejs') {
const path = await import('node:path');
const { default: config } = await import('./keystatic.config');
const { createReader } = await import('@keystatic/core/reader');
return createReader('.', config);
const contentPath = process.env.NEXT_PUBLIC_KEYSTATIC_CONTENT_PATH;
const repositoryPath = path.join(process.cwd(), contentPath as string);
return createReader(repositoryPath, config);
} else {
// we should never get here but the compiler requires the check
// to ensure we don't parse the package at build time