Skip to content

add markdown landing_page field to study to hold mdx strings#79

Merged
dannda merged 1 commit intodevfrom
feat/study-landing
Dec 9, 2025
Merged

add markdown landing_page field to study to hold mdx strings#79
dannda merged 1 commit intodevfrom
feat/study-landing

Conversation

@dannda
Copy link
Contributor

@dannda dannda commented Dec 4, 2025

Description

to manage custom landing pages in strapi

Type of change

  • 🐛 Bug fix (non-breaking change that resolves an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • ⚡ Optimisation (non-breaking improvement to performance or efficiency)
  • 🧩 Documentation (adds or improves documentation)
  • 🧱 Maintenance (refactor, dependency update, CI/CD, etc.)
  • 🔥 Breaking change (fix or feature that causes existing functionality to change)

Checklist

  • All tests pass (eg. npm test)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)
  • Documentation updated (if required)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_page richtext field to the Study schema
  • Exposed the new field in the findOne controller 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',
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Member

@davehorsfall davehorsfall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks, good. Thanks.

@dannda dannda merged commit 03c320b into dev Dec 9, 2025
6 checks passed
@dannda dannda deleted the feat/study-landing branch December 9, 2025 12:34
@davehorsfall
Copy link
Member

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants