Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Added SEO Metadata#97

Open
gdcsinaptik wants to merge 2 commits into
feat/save_completionsfrom
analytics/seo-metadata
Open

Added SEO Metadata#97
gdcsinaptik wants to merge 2 commits into
feat/save_completionsfrom
analytics/seo-metadata

Conversation

@gdcsinaptik

@gdcsinaptik gdcsinaptik commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

Added proper page titles and social sharing previews so the site looks good when shared on social media and ranks better in search results.

Environment Variables
You need to add these to your .env file:

bash
NEXT_PUBLIC_BASE_URL=https://chat.pandas-ai.com
GOOGLE_SITE_VERIFICATION=

Important

Adds SEO metadata generation and validation, updates layout files, and introduces new environment variables for improved social media sharing and search engine ranking.

  • SEO Metadata:
    • Adds generateMetadata and generatePageMetadata functions in metadata.ts to generate SEO metadata for pages.
    • Updates layout.tsx, creations/layout.tsx, and upgrade/layout.tsx to use generatePageMetadata for setting page metadata.
  • Environment Variables:
    • Adds NEXT_PUBLIC_BASE_URL and GOOGLE_SITE_VERIFICATION to .env.example.
  • Testing:
    • Introduces test-metadata.js script to validate metadata configuration, checking title, description, keywords, and layout file existence.

This description was created by Ellipsis for 3aed27d. You can customize this summary. It will automatically update as commits are pushed.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 3aed27d in 2 minutes and 15 seconds. Click for details.
  • Reviewed 320 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. examples/ui/frontend/src/app/metadata.ts:109
  • Draft comment:
    The generatePageMetadata wrapper adds no extra functionality; consider consolidating it with generateMetadata for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. examples/ui/frontend/scripts/test-metadata.js:101
  • Draft comment:
    Ensure process.cwd() returns the project root; file existence checks might fail if run from a different directory.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_Sa9gLO87Q5Rp0R07

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

address: false,
telephone: false,
},
metadataBase: new URL(baseUrl),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Validate that NEXT_PUBLIC_BASE_URL is defined to prevent runtime errors with new URL().

}

const baseUrl = process.env.NEXT_PUBLIC_BASE_URL;
const fullUrl = `${baseUrl}${page.path}`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider using URL resolution to join baseUrl and page.path to avoid potential double slashes.

Suggested change
const fullUrl = `${baseUrl}${page.path}`;
const fullUrl = new URL(page.path, baseUrl).toString();

},
metadataBase: new URL(baseUrl),
alternates: {
canonical: page.path,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using a relative path for the canonical alternate may not meet SEO best practices; consider using an absolute URL.

Suggested change
canonical: page.path,
canonical: fullUrl,

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant