Skip to content

Refactor SEO audit and page discovery scripts; update domain referenc…#35

Merged
pphatdev merged 1 commit intodevelopfrom
34-fix-seo
May 28, 2025
Merged

Refactor SEO audit and page discovery scripts; update domain referenc…#35
pphatdev merged 1 commit intodevelopfrom
34-fix-seo

Conversation

@pphatdev
Copy link
Owner

This pull request focuses on migrating the domain from pphat.netlify.app to pphat.top and improving SEO-related configurations. The changes include updates to domain references across multiple files, enhancements to sitemap and robots.txt configurations, and removal of outdated scripts and files.

Domain Migration

  • Updated domain references in doc/GOOGLE-INDEXING-FIX.md, including sitemap URLs and Google Search Console instructions. [1] [2] [3]
  • Modified package.json scripts to use the new domain pphat.top for sitemap generation.

SEO Configuration Enhancements

  • Enhanced robots.txt to include updated sitemap URLs and refined blocking rules for admin/auth pages.
  • Added detailed status updates and next steps for SEO fixes in doc/GOOGLE-INDEXING-FIX.md.

Codebase Cleanup

  • Removed the outdated page-discovery.js script, which was used for analyzing page discovery and sitemap discrepancies.
  • Deleted the obsolete seo-audit-2025-05-28.json file containing outdated audit data.…es to new URL; remove obsolete files and adjust robots.txt for new sitemap links.

…es to new URL; remove obsolete files and adjust robots.txt for new sitemap links.
@pphatdev pphatdev requested a review from Copilot May 28, 2025 15:35
@pphatdev pphatdev self-assigned this May 28, 2025
@pphatdev pphatdev linked an issue May 28, 2025 that may be closed by this pull request
@pphatdev pphatdev merged commit 5f06baf into develop May 28, 2025
1 check passed
Copy link
Contributor

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 migrates all domain references from pphat.netlify.app to pphat.top, enhances SEO configurations (sitemap, robots.txt, and documentation), and removes obsolete audit and discovery scripts.

  • Updated domain defaults and references across scripts, components, and configuration files
  • Enhanced robots.txt and documentation for better SEO guidance
  • Removed outdated seo-audit.js, page-discovery.js, and legacy audit JSON

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/scripts/seo-audit.ts Updated hard-coded sitemap URLs in action plan
src/lib/data.ts Changed default currentDomain to pphat.top
src/lib/constants.ts Changed default currentDomain to pphat.top
src/components/organization-structured-data.tsx Updated commented domain and sameAs link
public/robots.txt Updated sitemap URLs to pphat.top
package.json Updated generate:sitemap script to new domain
doc/GOOGLE-INDEXING-FIX.md Updated domain and sitemap instructions in docs
seo-audit.js Removed legacy SEO audit script
seo-audit-2025-05-28.json Removed outdated audit data
page-discovery.js Removed legacy page-discovery script

"generate": "tsc src/scripts/build.ts --outDir build && node build/scripts/build.js",
"generate:manifest": "tsc src/scripts/generate-manifest.ts --outDir build && node build/scripts/generate-manifest.js",
"generate:sitemap": "set NEXT_PUBLIC_APP_URL=https://pphat.netlify.app && tsc src/scripts/generate-sitemap.ts --outDir build/scripts && set NEXT_PUBLIC_APP_URL=https://pphat.netlify.app && node build/scripts/scripts/generate-sitemap.js",
"generate:sitemap": "set NEXT_PUBLIC_APP_URL=https://pphat.top && tsc src/scripts/generate-sitemap.ts --outDir build/scripts && set NEXT_PUBLIC_APP_URL=https://pphat.top && node build/scripts/scripts/generate-sitemap.js",
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

Consider using a cross-platform tool like cross-env to set environment variables and remove the duplicated set NEXT_PUBLIC_APP_URL commands for maintainability.

Copilot uses AI. Check for mistakes.
## ✅ COMPLETED FIXES (May 28, 2025)

### 1. Robots.txt Issues ✅
- **Fixed**: Incorrect sitemap URLs pointing to `pphat.top` instead of `pphat.netlify.app`
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

[nitpick] The description is reversed—update it to clearly state that URLs were corrected from pphat.netlify.app to pphat.top.

Suggested change
- **Fixed**: Incorrect sitemap URLs pointing to `pphat.top` instead of `pphat.netlify.app`
- **Fixed**: Incorrect sitemap URLs corrected from `pphat.netlify.app` to `pphat.top`

Copilot uses AI. Check for mistakes.
export const appPositions = ["Senior Front-end Developer.", "UI/UX Designer."]
export const appDescriptions = "Hello! I'm Sophat LEAT, also known as PPhat, and I'm thrilled to have you here. This portfolio showcases my journey, projects, and passions as a developer and creator. Explore my work, check out my skills, and feel free to connect if you'd like to collaborate or learn more.\nLet's build something amazing together!"
export const currentDomain = process.env.NEXT_PUBLIC_APP_URL || "https://pphat.netlify.app" No newline at end of file
export const currentDomain = process.env.NEXT_PUBLIC_APP_URL || "https://pphat.top" No newline at end of file
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

Both src/lib/constants.ts and src/lib/data.ts define currentDomain. Consider centralizing this value in one module to avoid duplication and potential drift.

Copilot uses AI. Check for mistakes.
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.

Fix SEO

2 participants