-
Notifications
You must be signed in to change notification settings - Fork 1
Labels
Description
Hi there,
When trying to use the API key from .env file, i saw this error "GHOST_CONTENT_API_KEY is required in your .env file to use this loader".
It works fine when this is passed in config.ts collection function "__DO_NOT_USE_TESTING_ONLY__GHOST_CONTENT_API_KEY".
Upon investigating, i found that vite uses the prefix to filter the data in .env file.
So, i used this custom prefix and it works for me.
const env = loadEnv("all", process.cwd(), 'GHOST_');
I don't know how it would work for others, pls investigate further and add this support.
Thanks a lot for your ghostcms-loader module, it works well alongside other content collections(I'm not a web developer btw).
Thanks,
Vinay