Refactor SEO audit and page discovery scripts; update domain referenc…#35
Refactor SEO audit and page discovery scripts; update domain referenc…#35
Conversation
…es to new URL; remove obsolete files and adjust robots.txt for new sitemap links.
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
| ## ✅ COMPLETED FIXES (May 28, 2025) | ||
|
|
||
| ### 1. Robots.txt Issues ✅ | ||
| - **Fixed**: Incorrect sitemap URLs pointing to `pphat.top` instead of `pphat.netlify.app` |
There was a problem hiding this comment.
[nitpick] The description is reversed—update it to clearly state that URLs were corrected from pphat.netlify.app to pphat.top.
| - **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` |
| 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 |
There was a problem hiding this comment.
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.
This pull request focuses on migrating the domain from
pphat.netlify.apptopphat.topand 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
doc/GOOGLE-INDEXING-FIX.md, including sitemap URLs and Google Search Console instructions. [1] [2] [3]package.jsonscripts to use the new domainpphat.topfor sitemap generation.SEO Configuration Enhancements
doc/GOOGLE-INDEXING-FIX.md.Codebase Cleanup
page-discovery.jsscript, which was used for analyzing page discovery and sitemap discrepancies.seo-audit-2025-05-28.jsonfile containing outdated audit data.…es to new URL; remove obsolete files and adjust robots.txt for new sitemap links.