Update KEYSTATIC paths and storage handling
The code now reads storage type from a constant instead of directly from the environment variable. It also checks if `NEXT_RUNTIME` is `nodejs` before parsing Keystatic config and core reader. The `README.md` and `keystatic.config.ts` were updated to handle a new environment variable `KEYSTATIC_CONTENT_PATH` for custom content paths.
This commit is contained in:
@@ -30,7 +30,7 @@ const storage = z.union([local, cloud, github]).parse({
|
||||
pathPrefix: process.env.KEYSTATIC_PATH_PREFIX,
|
||||
});
|
||||
|
||||
const path = process.env.KEY_STATIC_PATH ?? 'content';
|
||||
const path = process.env.KEYSTATIC_CONTENT_PATH ?? 'content';
|
||||
|
||||
const keyStaticConfig = createKeyStaticConfig(path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user