add markdown landing_page field to study to hold mdx strings#79
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a landing_page field to the Study content type in Strapi to enable management of custom landing pages using MDX strings. The field is defined as a richtext type in the schema and is exposed through the API controller for individual study queries.
- Added
landing_pagerichtext field to the Study schema - Exposed the new field in the
findOnecontroller method for individual study queries
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/api/study/content-types/study/schema.json | Adds landing_page richtext field to the Study content type schema |
| src/api/study/controllers/study.js | Includes landing_page in the fields returned by the findOne method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'slug', | ||
| 'lay_summary', | ||
| 'cover_video', | ||
| 'landing_page', |
There was a problem hiding this comment.
The landing_page field is added to the findOne method's fields list (line 130), but it's missing from the find method's fields list (line 23). If the landing page should be accessible when listing studies, add 'landing_page' to the fields array in the find method. If it should only be available in single study queries, this is correct as-is, but consider documenting this intentional exclusion.
|
🎉 This PR is included in version 1.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
to manage custom landing pages in strapi
Type of change
Checklist
npm test)pre-commit run --all-files)