feat(seo): harden site metadata and indexing - #82
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69263c41ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pubDate: post.data.publicationDate, | ||
| author: post.data.author, | ||
| categories: post.data.categories, | ||
| customData: `<guid isPermaLink="true">${escapeXml(pageUrl)}</guid>`, |
There was a problem hiding this comment.
Avoid emitting a second GUID for each RSS item
@astrojs/rss already derives a <guid isPermaLink="true"> element from each item's link, so adding the same element through customData gives every item two GUIDs. RSS consumers and validators can reject the invalid item structure or disagree about its identifier; remove the custom GUID and make the SEO check assert that the library-generated GUID occurs exactly once.
Useful? React with 👍 / 👎.
| const bvid = normalized ? new URL(normalized).searchParams.get("bvid") : null; | ||
| return bvid ? `https://www.bilibili.com/video/${bvid}/` : undefined; |
There was a problem hiding this comment.
Preserve direct Bilibili video URLs
When biliUrl is a normal video URL such as the existing src/content/posts/ep52.mdx value https://www.bilibili.com/video/BV1yvFXzuEfY, it has no bvid query parameter, so this helper returns undefined. The new PodcastEpisode.sameAs metadata therefore silently omits that episode's valid Bilibili link; extract the BV id from the pathname as well or preserve an already canonical direct URL.
Useful? React with 👍 / 👎.
Summary
Why
AsyncTalk is the official podcast website, but its generated HTML contained duplicate titles and descriptions, lacked canonical URLs, exposed malformed podcast structured data, and included demo routes in the sitemap. Episode descriptions also repeated their titles instead of summarizing the content.
Impact
Search engines and social crawlers now receive consistent trailing-slash canonicals, Chinese-language metadata, valid PodcastSeries and PodcastEpisode data, absolute share images, and richer episode summaries. Future builds fail if key SEO invariants regress.
Verification
Deployment note
Add the planned Cloudflare 301 rule for non-trailing-slash page URLs after deployment; Cloudflare configuration is outside this repository.