Main#1
Conversation
Reviewer's GuideAdds SEO-focused enhancements (metadata, FAQ schema, noscript content, sitemap, robots placeholder), expands documented platform/model coverage and referral explanations in README, parameterizes README generation script, and introduces a GitHub Actions workflow to auto-deploy the site to GitHub Pages. Flow diagram for README generation using environment variablesgraph TD
Start[Start generate-readme.js] --> LoadEnv[Load environment variables]
LoadEnv --> CheckOnlineUrl{ONLINE_URL set?}
CheckOnlineUrl -- Yes --> UseEnvOnlineUrl[Use ONLINE_URL from env]
CheckOnlineUrl -- No --> UseDefaultOnlineUrl[Use default https://longcoderx.github.io/coding-plan-page/]
UseEnvOnlineUrl --> SetOnlineUrlConst[Set ONLINE_URL constant]
UseDefaultOnlineUrl --> SetOnlineUrlConst
SetOnlineUrlConst --> CheckFooter{FOOTER set?}
CheckFooter -- Yes --> UseEnvFooter[Use FOOTER from env]
CheckFooter -- No --> UseDefaultFooter[Use default 由 LongCoderX 维护]
UseEnvFooter --> SetFooterConst[Set FOOTER constant]
UseDefaultFooter --> SetFooterConst
SetFooterConst --> ReadConfig[Read config.json and plans.json]
ReadConfig --> GenerateReadme[Generate README.md content]
GenerateReadme --> End[Write README.md file]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
- In
scripts/generate-readme.js, the newly addedONLINE_URLandFOOTERconstants are currently unused; either wire them into the README generation or remove them to avoid dead code. - The
sitemap.xmlhas a hardcodedlastmoddate and absolute URL, which will go stale over time; consider generating this file (or at least the date/loc) dynamically in the CI workflow so it stays in sync with deployments andONLINE_URL.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `scripts/generate-readme.js`, the newly added `ONLINE_URL` and `FOOTER` constants are currently unused; either wire them into the README generation or remove them to avoid dead code.
- The `sitemap.xml` has a hardcoded `lastmod` date and absolute URL, which will go stale over time; consider generating this file (or at least the date/loc) dynamically in the CI workflow so it stays in sync with deployments and `ONLINE_URL`.
## Individual Comments
### Comment 1
<location path=".github/workflows/deploy.yml" line_range="20-27" />
<code_context>
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Generate README
+ run: node scripts/generate-readme.js
+ env:
+ ONLINE_URL: ${{ vars.PAGES_URL || 'https://longcoderx.github.io/coding-plan-page/' }}
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Add an explicit Node setup step to avoid relying on the runner's default Node installation.
This step runs `node scripts/generate-readme.js` without guaranteeing a specific Node version. To avoid future breakage from runner changes or version drift, add an `actions/setup-node@v4` step with an explicit version (e.g. `node-version: 20`) before running this script.
```suggestion
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Generate README
run: node scripts/generate-readme.js
env:
ONLINE_URL: ${{ vars.PAGES_URL || 'https://longcoderx.github.io/coding-plan-page/' }}
```
</issue_to_address>
### Comment 2
<location path="sitemap.xml" line_range="5" />
<code_context>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+ <url>
+ <loc>https://longcoderx.github.io/coding-plan-page/</loc>
+ <lastmod>2026-04-06</lastmod>
+ <changefreq>weekly</changefreq>
+ <priority>1.0</priority>
</code_context>
<issue_to_address>
**issue (bug_risk):** Avoid hardcoding a future and non-updating `lastmod` date in the sitemap.
Using a fixed future `lastmod` date means it will never reflect real content changes, which can reduce the sitemap’s value to crawlers. Consider either updating this value whenever the file changes, or generating the sitemap dynamically (e.g., in the deploy workflow) so `lastmod` matches the actual deployment time.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Generate README | ||
| run: node scripts/generate-readme.js | ||
| env: | ||
| ONLINE_URL: ${{ vars.PAGES_URL || 'https://longcoderx.github.io/coding-plan-page/' }} |
There was a problem hiding this comment.
suggestion (bug_risk): Add an explicit Node setup step to avoid relying on the runner's default Node installation.
This step runs node scripts/generate-readme.js without guaranteeing a specific Node version. To avoid future breakage from runner changes or version drift, add an actions/setup-node@v4 step with an explicit version (e.g. node-version: 20) before running this script.
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Generate README | |
| run: node scripts/generate-readme.js | |
| env: | |
| ONLINE_URL: ${{ vars.PAGES_URL || 'https://longcoderx.github.io/coding-plan-page/' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Generate README | |
| run: node scripts/generate-readme.js | |
| env: | |
| ONLINE_URL: ${{ vars.PAGES_URL || 'https://longcoderx.github.io/coding-plan-page/' }} |
| <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
| <url> | ||
| <loc>https://longcoderx.github.io/coding-plan-page/</loc> | ||
| <lastmod>2026-04-06</lastmod> |
There was a problem hiding this comment.
issue (bug_risk): Avoid hardcoding a future and non-updating lastmod date in the sitemap.
Using a fixed future lastmod date means it will never reflect real content changes, which can reduce the sitemap’s value to crawlers. Consider either updating this value whenever the file changes, or generating the sitemap dynamically (e.g., in the deploy workflow) so lastmod matches the actual deployment time.
Summary by Sourcery
Improve SEO, documentation, and automation for the AI Coding Plan comparison site.
New Features:
Enhancements:
CI:
Deployment:
Documentation: