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

Feat(cms): add SEO component #82

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Feat(cms): add SEO component #82

merged 2 commits into from
Feb 11, 2025

Conversation

alcercu
Copy link
Collaborator

@alcercu alcercu commented Feb 11, 2025

Summary by CodeRabbit

  • New Features
    • Introduced comprehensive SEO management for various pages including brand assets, community, cooperative, earn, builders, lawyers, home, token, and R&D.
    • Enabled functionality for creating, drafting, and publishing SEO content across these sections.
    • Launched a standardized SEO configuration with required fields for title, description, and image.

Copy link
Contributor

coderabbitai bot commented Feb 11, 2025

Walkthrough

This pull request introduces new backend functionality for multiple SEO-related content types within the CMS. For each page type (e.g., brand-assets, community, cooperative, earn, for-builders, for-lawyers, home, pnk-token, r-and-d), new JSON schema files are created along with their respective controllers, routers, and services using Strapi’s core factory methods. Additionally, a new SEO component configuration file is added to standardize SEO attributes across content types.

Changes

File Group File Paths (summarized) Summary
Content Type Schemas cms-backend/src/api/.../content-types/[page-seo]/schema.json (brand-assets, community, cooperative, earn, for-builders, for-lawyers, home, pnk-token, r-and-d) Added new JSON schemas defining SEO content types with metadata, options for draft/publish, and a non-repeatable SEO attribute configuration.
Controllers cms-backend/src/api/.../controllers/[page-seo].ts (for all the above types) Introduced controllers via factories.createCoreController to handle API endpoints specific to each SEO content type.
Routers cms-backend/src/api/.../routes/[page-seo].ts (for all the above types) Added new routers using factories.createCoreRouter to manage HTTP routes for each SEO-related page.
Services cms-backend/src/api/.../services/[page-seo].ts (for all the above types) Implemented services using factories.createCoreService to encapsulate business logic for the various SEO content types.
SEO Component cms-backend/src/components/content/seo.json Added a new SEO component configuration defining required attributes (title, description, image) to be reused across content types.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant R as Router
    participant CT as Controller
    participant S as Service
    participant DB as Database

    C->>R: Send HTTP Request
    R->>CT: Forward request (via routing)
    CT->>S: Invoke required SEO logic
    S->>DB: Query/update SEO data
    DB-->>S: Return response data
    S-->>CT: Send business logic result
    CT-->>R: Format response
    R-->>C: Return HTTP Response
Loading

Possibly related PRs

Suggested reviewers

  • Harman-singh-waraich

Poem

In fields of code I hop and play,
Crafting schemas in a wondrous way.
Controllers, routers, and services in a row,
Strapi magic makes the data flow.
Hoppity-hop, my changes sing—
A bunny’s ode to SEO, let the updates bring!
(\/) 🥕 (••)

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for kleros-website-v2 ready!

Name Link
🔨 Latest commit 8a2a699
🔍 Latest deploy log https://app.netlify.com/sites/kleros-website-v2/deploys/67ab6032cc31a10008128277
😎 Deploy Preview https://deploy-preview-82--kleros-website-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for kleros-website-v2 canceled.

Name Link
🔨 Latest commit 2b607c8
🔍 Latest deploy log https://app.netlify.com/sites/kleros-website-v2/deploys/67ab603a58d6c60009181aa7

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (19)
cms-backend/src/api/home-page-seo/controllers/home-page-seo.ts (1)

5-5: Add missing semicolon for consistency.

Add a semicolon after the import statement to maintain consistency with other files.

-import { factories } from '@strapi/strapi'
+import { factories } from '@strapi/strapi';
cms-backend/src/api/earn-page-seo/controllers/earn-page-seo.ts (1)

5-5: Add missing semicolon for consistency.

Add a semicolon after the import statement to maintain consistency with other files.

-import { factories } from '@strapi/strapi'
+import { factories } from '@strapi/strapi';
cms-backend/src/api/r-and-d-page-seo/routes/r-and-d-page-seo.ts (1)

1-3: Enhance documentation with route details.

While the documentation header is present, it would be more helpful to include information about the available routes and their purposes.

 /**
  * r-and-d-page-seo router
+ *
+ * Available routes:
+ * GET    /api/r-and-d-page-seo
+ * GET    /api/r-and-d-page-seo/:id
+ * POST   /api/r-and-d-page-seo
+ * PUT    /api/r-and-d-page-seo/:id
+ * DELETE /api/r-and-d-page-seo/:id
  */
cms-backend/src/api/pnk-token-page-seo/routes/pnk-token-page-seo.ts (1)

1-3: Maintain consistent documentation across routers.

For consistency with other router files, enhance the documentation with route details.

 /**
  * pnk-token-page-seo router
+ *
+ * Available routes:
+ * GET    /api/pnk-token-page-seo
+ * GET    /api/pnk-token-page-seo/:id
+ * POST   /api/pnk-token-page-seo
+ * PUT    /api/pnk-token-page-seo/:id
+ * DELETE /api/pnk-token-page-seo/:id
  */
cms-backend/src/api/r-and-d-page-seo/controllers/r-and-d-page-seo.ts (2)

1-3: Enhance controller documentation.

Add details about the controller's functionality and available methods.

 /**
  * r-and-d-page-seo controller
+ *
+ * Standard Strapi controller providing CRUD operations:
+ * - find: Get a list of SEO entries
+ * - findOne: Get a specific SEO entry
+ * - create: Create a new SEO entry
+ * - update: Update an existing SEO entry
+ * - delete: Remove an SEO entry
  */

5-5: Add missing semicolon for consistency.

Add semicolon after import statement to maintain consistent style.

-import { factories } from '@strapi/strapi'
+import { factories } from '@strapi/strapi';
cms-backend/src/api/community-page-seo/controllers/community-page-seo.ts (2)

1-3: Maintain consistent documentation across controllers.

For consistency with other controller files, enhance the documentation with method details.

 /**
  * community-page-seo controller
+ *
+ * Standard Strapi controller providing CRUD operations:
+ * - find: Get a list of SEO entries
+ * - findOne: Get a specific SEO entry
+ * - create: Create a new SEO entry
+ * - update: Update an existing SEO entry
+ * - delete: Remove an SEO entry
  */

5-5: Add missing semicolon for consistency.

Add semicolon after import statement to maintain consistent style.

-import { factories } from '@strapi/strapi'
+import { factories } from '@strapi/strapi';
cms-backend/src/api/for-lawyers-page-seo/services/for-lawyers-page-seo.ts (1)

1-7: LGTM! Consider caching for performance optimization.

The service implementation correctly uses Strapi's factory method. For better performance, consider implementing caching for SEO content since it doesn't change frequently.

Consider implementing a caching layer:

  1. Use Redis/Memcached for caching SEO content
  2. Implement cache invalidation on content updates
  3. Set appropriate TTL based on content update frequency
cms-backend/src/api/brand-assets-page-seo/routes/brand-assets-page-seo.ts (1)

1-7: LGTM! Consider adding API documentation.

The router implementation correctly uses Strapi's factory method. Consider enhancing the documentation to include available endpoints and their usage.

Add OpenAPI/Swagger documentation for the auto-generated routes:

 /**
  * brand-assets-page-seo router
+ *
+ * Generated endpoints:
+ * GET /api/brand-assets-page-seo - List all entries
+ * GET /api/brand-assets-page-seo/:id - Get a specific entry
+ * POST /api/brand-assets-page-seo - Create a new entry
+ * PUT /api/brand-assets-page-seo/:id - Update an entry
+ * DELETE /api/brand-assets-page-seo/:id - Delete an entry
  */
cms-backend/src/api/for-builders-page-seo/routes/for-builders-page-seo.ts (1)

1-7: LGTM! Consider adding API documentation.

The router implementation correctly uses Strapi's factory method. For consistency with other SEO routes, consider enhancing the documentation.

Add OpenAPI/Swagger documentation for the auto-generated routes:

 /**
  * for-builders-page-seo router
+ *
+ * Generated endpoints:
+ * GET /api/for-builders-page-seo - List all entries
+ * GET /api/for-builders-page-seo/:id - Get a specific entry
+ * POST /api/for-builders-page-seo - Create a new entry
+ * PUT /api/for-builders-page-seo/:id - Update an entry
+ * DELETE /api/for-builders-page-seo/:id - Delete an entry
  */
cms-backend/src/api/for-builders-page-seo/services/for-builders-page-seo.ts (1)

1-3: Enhance service documentation with usage examples.

While the basic documentation is present, consider adding:

  • Service responsibility and purpose
  • Example usage patterns
  • Available methods and their parameters
 /**
  * for-builders-page-seo service
+ *
+ * @description Handles business logic for builders page SEO content
+ * including CRUD operations and data transformations.
+ *
+ * @example
+ * // Get SEO data
+ * const seoData = await strapi.service('api::for-builders-page-seo.for-builders-page-seo').find();
  */
cms-backend/src/api/cooperative-page-seo/controllers/cooperative-page-seo.ts (1)

5-5: Add missing semicolon for consistency.

Add semicolon to maintain consistent style with other imports.

-import { factories } from '@strapi/strapi'
+import { factories } from '@strapi/strapi';
cms-backend/src/api/brand-assets-page-seo/controllers/brand-assets-page-seo.ts (1)

1-8: Consider implementing SEO data validation middleware.

Since this is part of a larger SEO implementation, consider adding:

  1. Middleware for validating SEO metadata format
  2. Rate limiting for SEO data updates
  3. Sanitization of user-provided SEO content

This will help ensure data quality and security across all SEO endpoints.

Would you like me to provide an example implementation of the validation middleware?

cms-backend/src/api/r-and-d-page-seo/content-types/r-and-d-page-seo/schema.json (1)

7-7: Consider standardizing the display name format.

The display name "R&DPageSEO" uses an ampersand which might cause issues in some contexts. Consider using "RAndDPageSEO" for consistency with other display names.

cms-backend/src/api/community-page-seo/content-types/community-page-seo/schema.json (1)

1-20: Consider implementing SEO validation middleware.

Since you're implementing SEO across multiple pages, consider adding:

  1. A validation middleware to ensure SEO content meets best practices (title length, meta description length, etc.)
  2. A default SEO configuration for new pages
  3. Automated SEO score calculation based on content analysis

Would you like me to help implement any of these suggestions?

cms-backend/src/components/content/seo.json (1)

7-24: Consider adding additional SEO metadata fields.

The current SEO component could be enhanced with additional metadata fields commonly used for better SEO and social sharing:

 "attributes": {
   "title": {
     "type": "string",
     "required": true
   },
   "description": {
     "type": "string",
     "required": true
   },
   "image": {
     "allowedTypes": [
       "images"
     ],
     "type": "media",
     "multiple": false,
     "required": true
   },
+  "metaKeywords": {
+    "type": "string",
+    "required": false
+  },
+  "canonicalURL": {
+    "type": "string",
+    "required": false
+  },
+  "robotsDirective": {
+    "type": "enumeration",
+    "enum": [
+      "index,follow",
+      "noindex,follow",
+      "index,nofollow",
+      "noindex,nofollow"
+    ],
+    "required": false,
+    "default": "index,follow"
+  },
+  "ogType": {
+    "type": "string",
+    "required": false,
+    "default": "website"
+  },
+  "twitterCardType": {
+    "type": "enumeration",
+    "enum": [
+      "summary",
+      "summary_large_image"
+    ],
+    "required": false,
+    "default": "summary_large_image"
+  }
 }
cms-backend/src/api/for-builders-page-seo/content-types/for-builders-page-seo/schema.json (1)

1-20: Add schema documentation for maintainability.

The schema implementation is consistent across all page types, which is good. Consider adding documentation to explain the purpose and usage of these SEO schemas.

 {
   "kind": "singleType",
   "collectionName": "...",
   "info": {
     "singularName": "...",
     "pluralName": "...",
-    "displayName": "..."
+    "displayName": "...",
+    "description": "Manages SEO metadata for the ... page. This includes title, description, and social sharing image."
   },
   ...
 }
cms-backend/src/api/brand-assets-page-seo/content-types/brand-assets-page-seo/schema.json (1)

1-20: Consider a more maintainable approach for multiple SEO schemas.

Currently, there are multiple nearly identical SEO schemas for different pages. Consider these alternatives for better maintainability:

  1. Use a single SEO content type with a page reference/relation
  2. Implement a dynamic zone approach
  3. Use content type extensions

This would reduce duplication and make future SEO changes easier to manage.

Would you like me to provide a detailed implementation example for any of these approaches?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f0d09ba and 2b607c8.

⛔ Files ignored due to path filters (2)
  • cms-backend/types/generated/components.d.ts is excluded by !**/generated/**
  • cms-backend/types/generated/contentTypes.d.ts is excluded by !**/generated/**
📒 Files selected for processing (37)
  • cms-backend/src/api/brand-assets-page-seo/content-types/brand-assets-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/brand-assets-page-seo/controllers/brand-assets-page-seo.ts (1 hunks)
  • cms-backend/src/api/brand-assets-page-seo/routes/brand-assets-page-seo.ts (1 hunks)
  • cms-backend/src/api/brand-assets-page-seo/services/brand-assets-page-seo.ts (1 hunks)
  • cms-backend/src/api/community-page-seo/content-types/community-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/community-page-seo/controllers/community-page-seo.ts (1 hunks)
  • cms-backend/src/api/community-page-seo/routes/community-page-seo.ts (1 hunks)
  • cms-backend/src/api/community-page-seo/services/community-page-seo.ts (1 hunks)
  • cms-backend/src/api/cooperative-page-seo/content-types/cooperative-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/cooperative-page-seo/controllers/cooperative-page-seo.ts (1 hunks)
  • cms-backend/src/api/cooperative-page-seo/routes/cooperative-page-seo.ts (1 hunks)
  • cms-backend/src/api/cooperative-page-seo/services/cooperative-page-seo.ts (1 hunks)
  • cms-backend/src/api/earn-page-seo/content-types/earn-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/earn-page-seo/controllers/earn-page-seo.ts (1 hunks)
  • cms-backend/src/api/earn-page-seo/routes/earn-page-seo.ts (1 hunks)
  • cms-backend/src/api/earn-page-seo/services/earn-page-seo.ts (1 hunks)
  • cms-backend/src/api/for-builders-page-seo/content-types/for-builders-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/for-builders-page-seo/controllers/for-builders-page-seo.ts (1 hunks)
  • cms-backend/src/api/for-builders-page-seo/routes/for-builders-page-seo.ts (1 hunks)
  • cms-backend/src/api/for-builders-page-seo/services/for-builders-page-seo.ts (1 hunks)
  • cms-backend/src/api/for-lawyers-page-seo/content-types/for-lawyers-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/for-lawyers-page-seo/controllers/for-lawyers-page-seo.ts (1 hunks)
  • cms-backend/src/api/for-lawyers-page-seo/routes/for-lawyers-page-seo.ts (1 hunks)
  • cms-backend/src/api/for-lawyers-page-seo/services/for-lawyers-page-seo.ts (1 hunks)
  • cms-backend/src/api/home-page-seo/content-types/home-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/home-page-seo/controllers/home-page-seo.ts (1 hunks)
  • cms-backend/src/api/home-page-seo/routes/home-page-seo.ts (1 hunks)
  • cms-backend/src/api/home-page-seo/services/home-page-seo.ts (1 hunks)
  • cms-backend/src/api/pnk-token-page-seo/content-types/pnk-token-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/pnk-token-page-seo/controllers/pnk-token-page-seo.ts (1 hunks)
  • cms-backend/src/api/pnk-token-page-seo/routes/pnk-token-page-seo.ts (1 hunks)
  • cms-backend/src/api/pnk-token-page-seo/services/pnk-token-page-seo.ts (1 hunks)
  • cms-backend/src/api/r-and-d-page-seo/content-types/r-and-d-page-seo/schema.json (1 hunks)
  • cms-backend/src/api/r-and-d-page-seo/controllers/r-and-d-page-seo.ts (1 hunks)
  • cms-backend/src/api/r-and-d-page-seo/routes/r-and-d-page-seo.ts (1 hunks)
  • cms-backend/src/api/r-and-d-page-seo/services/r-and-d-page-seo.ts (1 hunks)
  • cms-backend/src/components/content/seo.json (1 hunks)
✅ Files skipped from review due to trivial changes (11)
  • cms-backend/src/api/brand-assets-page-seo/services/brand-assets-page-seo.ts
  • cms-backend/src/api/community-page-seo/routes/community-page-seo.ts
  • cms-backend/src/api/cooperative-page-seo/routes/cooperative-page-seo.ts
  • cms-backend/src/api/home-page-seo/services/home-page-seo.ts
  • cms-backend/src/api/for-lawyers-page-seo/routes/for-lawyers-page-seo.ts
  • cms-backend/src/api/community-page-seo/services/community-page-seo.ts
  • cms-backend/src/api/pnk-token-page-seo/services/pnk-token-page-seo.ts
  • cms-backend/src/api/cooperative-page-seo/services/cooperative-page-seo.ts
  • cms-backend/src/api/for-builders-page-seo/controllers/for-builders-page-seo.ts
  • cms-backend/src/api/r-and-d-page-seo/services/r-and-d-page-seo.ts
  • cms-backend/src/api/earn-page-seo/routes/earn-page-seo.ts
🔇 Additional comments (21)
cms-backend/src/api/home-page-seo/routes/home-page-seo.ts (1)

1-7: Implementation follows Strapi best practices!

The router is correctly implemented using Strapi's factory pattern and follows proper naming conventions.

cms-backend/src/api/earn-page-seo/services/earn-page-seo.ts (1)

1-7: Implementation follows Strapi best practices!

The service is correctly implemented using Strapi's factory pattern and follows proper naming conventions.

cms-backend/src/api/home-page-seo/controllers/home-page-seo.ts (1)

1-7: Implementation follows Strapi best practices!

The controller is correctly implemented using Strapi's factory pattern and follows proper naming conventions.

cms-backend/src/api/earn-page-seo/controllers/earn-page-seo.ts (1)

1-7: Implementation follows Strapi best practices!

The controller is correctly implemented using Strapi's factory pattern and follows proper naming conventions.

cms-backend/src/api/r-and-d-page-seo/routes/r-and-d-page-seo.ts (1)

5-7: LGTM!

The implementation correctly uses Strapi's factory method to create the router with proper API naming convention.

cms-backend/src/api/pnk-token-page-seo/routes/pnk-token-page-seo.ts (1)

5-7: LGTM!

The implementation correctly uses Strapi's factory method with proper API naming convention.

cms-backend/src/api/r-and-d-page-seo/controllers/r-and-d-page-seo.ts (1)

7-7: LGTM!

The controller implementation correctly uses Strapi's factory method.

cms-backend/src/api/community-page-seo/controllers/community-page-seo.ts (1)

7-7: LGTM!

The controller implementation correctly uses Strapi's factory method.

cms-backend/src/api/pnk-token-page-seo/controllers/pnk-token-page-seo.ts (1)

1-7: LGTM! Verify default CRUD operations security.

The controller implementation correctly uses Strapi's factory method. However, ensure that the default CRUD operations align with your security requirements.

Consider reviewing the following security aspects:

  1. Which CRUD operations are needed for SEO content?
  2. Should some operations be restricted?
❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Check for any custom security configurations in the repository
rg -g '*.{json,js,ts}' -i 'permissions|roles|authentication' ./config

Length of output: 120


Security Verification: Manual Review Needed for Default CRUD Operations

The pnk-token-page-seo controller correctly leverages Strapi’s default core controller. However, our automated check for custom security settings (i.e., role or permissions configurations in a centralized config directory) did not find any output. This may mean that your project either manages these settings elsewhere or relies entirely on default behavior.

Please manually verify:

  • Which CRUD operations are actually exposed for SEO content.
  • Whether any operations should be restricted or secured with explicit permission checks.
cms-backend/src/api/cooperative-page-seo/controllers/cooperative-page-seo.ts (1)

7-7: LGTM! Controller implementation follows Strapi best practices.

The controller is correctly implemented using Strapi's factory pattern, maintaining consistency with other SEO controllers.

cms-backend/src/api/for-lawyers-page-seo/controllers/for-lawyers-page-seo.ts (1)

5-7: Same issues as cooperative-page-seo controller.

The implementation is correct but has the same style inconsistency.

cms-backend/src/api/brand-assets-page-seo/controllers/brand-assets-page-seo.ts (1)

5-7: Same issues as cooperative-page-seo controller.

The implementation is correct but has the same style inconsistency.

cms-backend/src/api/earn-page-seo/content-types/earn-page-seo/schema.json (1)

1-20: Verify the SEO component configuration.

The schema looks good and follows Strapi's best practices. However, let's verify the structure of the referenced "content.seo" component.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify the SEO component configuration and its attributes

# Search for the SEO component definition
fd --type f 'seo.json' --exec cat {}

Length of output: 456


SEO Component Configuration Verified

The "content.seo" component is correctly defined in the seo.json file with the expected attributes (title, description, and image) and proper requirements, and it is accurately referenced in the earn-page-seo schema.

cms-backend/src/api/home-page-seo/content-types/home-page-seo/schema.json (1)

1-20: LGTM! Schema follows the established pattern.

The schema is well-structured and consistent with other SEO content types.

cms-backend/src/api/pnk-token-page-seo/content-types/pnk-token-page-seo/schema.json (1)

1-20: LGTM! Schema follows the established pattern.

The schema is well-structured and consistent with other SEO content types.

cms-backend/src/api/community-page-seo/content-types/community-page-seo/schema.json (1)

1-20: LGTM! Schema follows the established pattern.

The schema is well-structured and consistent with other SEO content types.

cms-backend/src/api/for-builders-page-seo/content-types/for-builders-page-seo/schema.json (1)

14-18: Verify SEO component references.

All schemas reference the "content.seo" component. Let's verify these references are valid across the codebase.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify SEO component references and usage

# Check if the SEO component is referenced consistently
echo "Checking SEO component references..."
rg -g '*.json' '"component":\s*"content.seo"' --stats

# Verify no orphaned or incorrect references
echo "Checking for potential mismatches..."
rg -g '*.json' 'content\.seo' -v '"component":\s*"content.seo"'

Length of output: 1567


SEO component references are consistent and valid.

All nine schema files correctly reference "component": "content.seo", and no mismatches or orphaned references were found.

cms-backend/src/api/for-lawyers-page-seo/content-types/for-lawyers-page-seo/schema.json (2)

1-20: LGTM! Schema structure follows Strapi conventions.

The schema is well-structured and follows Strapi's content-type schema conventions.


14-18: Verify the SEO component configuration.

Please ensure that the referenced "content.seo" component exists and is properly configured.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check if the SEO component exists and verify its configuration
fd --type f "seo.json" "cms-backend/src/components"

Length of output: 93


I'll now retrieve the content of the SEO component configuration file to verify that it is properly defined.


🏁 Script executed:

#!/bin/bash
cat cms-backend/src/components/content/seo.json

Length of output: 467


SEO component configuration verified.
The referenced component "content.seo" exists in the file cms-backend/src/components/content/seo.json and its configuration is properly defined with the necessary fields and validations.

cms-backend/src/api/cooperative-page-seo/content-types/cooperative-page-seo/schema.json (1)

1-20: LGTM! Schema maintains consistency with other SEO content types.

The schema follows the established pattern for SEO content types.

cms-backend/src/api/brand-assets-page-seo/content-types/brand-assets-page-seo/schema.json (1)

1-20: LGTM! Schema maintains consistency with other SEO content types.

The schema follows the established pattern for SEO content types.

Copy link
Contributor

@Harman-singh-waraich Harman-singh-waraich 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

@alcercu alcercu merged commit d76daa2 into master Feb 11, 2025
5 checks passed
@alcercu alcercu deleted the feat(cms)/add-SEO-type branch February 11, 2025 15:30
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.

2 participants