This project provides a custom field app for Contentful to handle ramdom string values of fixed length (like a secret).
- Clone the repo.
- Install dependencies:
npm install
- Start the development server:
npm run start
• Deploy or host this app in your Contentful environment. • Configure it as a field extension where you need a random secret value.
Follow these steps to create and configure your Contentful app from the terminal:
-
Create a new app definition:
npm run create-app-definition
-
Build the app:
npm run build
-
Upload the app:
npm run upload
-
Use the app in your content model:
- Edit your content model and add a new field.
- Set the field type to Short Text.
- Under Appearance, select your custom app.
- Ensure the field is set to required.
- Set the limit character count options (min and max) to the same number as the secret length option of the app.
Feel free to open issues or submit pull requests!
MIT License