Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Possibility to automatically add Yoast SEO functionality to custom records #511

Merged
merged 7 commits into from
Aug 16, 2022

Conversation

RinyVT
Copy link
Collaborator

@RinyVT RinyVT commented Aug 4, 2022

Summary

This PR can be summarized in the following changelog entry:

  • Added a possibility to configure full Yoast SEO functionality for custom records by adding a few lines to the TCA Overrides
  • For full explanation check the updated documentation
    • Tip: Checkout branch and run ddev docs to get the generated version

Relevant technical choices:

  • The setup of RecordUtility and RecordRegistry is based on the CategoryRegistry of core
  • The TCA for a registered record is expanded with a yoast_seo section with all the settings, in the frontend (and for updating database schema) these sections are read and converted to Record objects which are cached
    • Couldn't find another easy way of doing this, CategoryRegistry has its own hardcoded calls within core
  • Dropped support for PHP<7.4, this is for the upcoming major version 9

Test instructions

This PR can be tested by following these steps:

  • Following the documentation, configure for a record and see if all the backend fields are available and the frontend renders correctly (pagetitle, metatags, canonical)

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Fixes #507

@RinyVT RinyVT changed the base branch from master to feature/v9 August 4, 2022 06:14
@RinyVT RinyVT merged commit 08d39d2 into feature/v9 Aug 16, 2022
@RinyVT RinyVT deleted the feature/507-configure-records branch October 5, 2022 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to configure Yoast SEO functionality for records
2 participants