-
Notifications
You must be signed in to change notification settings - Fork 8
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
Generate SEO block fields #2614
Merged
thomasdax98
merged 24 commits into
feature/seo-tag-generation
from
generate-seo-block-data
Feb 17, 2025
Merged
Generate SEO block fields #2614
thomasdax98
merged 24 commits into
feature/seo-tag-generation
from
generate-seo-block-data
Feb 17, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
johnnyomair
reviewed
Oct 10, 2024
2 tasks
a9d8b8c
to
36703fc
Compare
2 tasks
aa49a3d
to
af7b6fc
Compare
Base automatically changed from
extract-text-content
to
feature/seo-tag-generation
February 10, 2025 15:43
4dcf95a
to
d114944
Compare
d114944
to
5a932d8
Compare
johnnyomair
reviewed
Feb 12, 2025
...api/cms-api/src/content-generation/azure-open-ai/azure-open-ai-content-generation.service.ts
Outdated
Show resolved
Hide resolved
packages/api/cms-api/src/content-generation/content-generation-service.interface.ts
Outdated
Show resolved
Hide resolved
packages/admin/cms-admin/src/documents/DocumentContentGenerationContext.tsx
Outdated
Show resolved
Hide resolved
packages/admin/cms-admin/src/blocks/seo/useSeoTagGeneration.tsx
Outdated
Show resolved
Hide resolved
packages/admin/cms-admin/src/blocks/seo/useSeoTagGeneration.tsx
Outdated
Show resolved
Hide resolved
packages/admin/cms-admin/src/blocks/seo/useSeoTagGeneration.tsx
Outdated
Show resolved
Hide resolved
packages/admin/cms-admin/src/blocks/seo/useSeoTagGeneration.tsx
Outdated
Show resolved
Hide resolved
…ovider and change config structure
…seoTagsCache and pendingRequest to be refs
johnnyomair
reviewed
Feb 17, 2025
packages/admin/cms-admin/src/blocks/seo/useSeoTagGeneration.test.tsx
Outdated
Show resolved
Hide resolved
3 tasks
johnnyomair
approved these changes
Feb 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add content generation for SEO tags in
SeoBlock
The
SeoBlock
can now generate the HTML title, meta description and OpenGraph title and description using theContentGenerationService
. An explanation for how to enable this feature can be found in the documentation: https://docs.comet-dxp.com/docs/features-modules/content-generation/#seo-block-generating-seo-tagsFurther adds
useSeoTagGeneration
Challenges
There are four different SEO tags we want to generate. It should be possible to generate (and regenerate) them independently.
We can either generate all four tags at once or each individually.
Pro / Con
Individually:
Pro:
Con:
All at once:
Pro:
Con:
I opted for an hybrid approach: Generate all SEO tags at once but only fill out one. Cache the response for the other tags and get them from the cache when needed. I also deduplicate mutations. If the field value and cached value is identical, I trigger a new generation.
This requires more complicated logic that I extracted to the
useSeoTagGeneration()
hook.Screenshots/screencasts
Bildschirmaufnahme.2025-02-10.um.16.10.52.mov
Changeset
Related tasks and documents
https://vivid-planet.atlassian.net/browse/COM-899