Skip to content

docs(seo): sync lectures 02/03 to sitemap/llms.txt/README and fix og:url#31

Closed
watanabe-kohei-jp wants to merge 1 commit into
mainfrom
work/lectures2
Closed

docs(seo): sync lectures 02/03 to sitemap/llms.txt/README and fix og:url#31
watanabe-kohei-jp wants to merge 1 commit into
mainfrom
work/lectures2

Conversation

@watanabe-kohei-jp
Copy link
Copy Markdown
Collaborator

Summary

  • 既存講義 02-setup / 03-claude-md を SEO・GEO 系メタデータに同期
  • 02 と 03 の og:url が旧 GitHub Pages URL (watanabe-kohei-jp.github.io) を指していた誤りを修正

Related Issue

No-Issue: STRATEGY.md「第1段:正典化+GEO」の同期漏れ追従。02/03 追加時にメタ側へ反映されていなかった小規模修正で、独立した issue を立てるほどではないため。

Changes

  • sitemap.xml — 02-setup / 03-claude-md の URL を追加、トップの lastmod を更新
  • llms.txt — 講義一覧に 02 / 03 を追記
  • index.html(トップ) — 講義リストに 02 / 03 を追加
  • README.md — 「何が読めるか」テーブルと公開 URL 一覧に 02 / 03 を追加
  • 02-setup/index.htmlog:urlco-lect.github.io に修正
  • 03-claude-md/index.html — 同上

Test plan

  • https://co-lect.github.io/lectures/sitemap.xml で 02/03 が返ることを確認
  • https://co-lect.github.io/lectures/llms.txt で 02/03 行があることを確認
  • トップページに 02/03 のリンクが表示されること
  • 02/03 の HTML を X 等のカードバリデータに通し、URL が co-lect.github.io/... になっていることを確認

🤖 Generated with Claude Code

既存講義 02-setup / 03-claude-md を SEO・GEO 系メタデータに同期し、
02/03 の og:url が旧 GitHub Pages URL を指していた誤りを修正する。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@watanabe-kohei-jp watanabe-kohei-jp marked this pull request as ready for review May 23, 2026 05:14
@watanabe-kohei-jp
Copy link
Copy Markdown
Collaborator Author

中身は PR #36 に完全に内包されているため、こちらをクローズします。#36 が main に直接入れば、本 PR の差分(02/03 を listing 群に追加 + og:url 修正)も同時に main へ反映されます。

watanabe-kohei-jp added a commit that referenced this pull request May 25, 2026
* docs(seo): sync lectures 02/03 to sitemap/llms.txt/README and fix og:url

既存講義 02-setup / 03-claude-md を SEO・GEO 系メタデータに同期し、
02/03 の og:url が旧 GitHub Pages URL を指していた誤りを修正する。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(automation): auto-sync listings from NN-slug/index.html

NN-slug/index.html を真実源として sitemap.xml / llms.txt / index.html /
README.md の講義一覧ブロックを自動生成する仕組みを追加。

- scripts/sync_listings.py: <title> / <meta description> / <section> 数を
  抽出して各 listing ファイルのマーカー間を再生成する
- sync-listings-check.yml: PR で --check を強制
- sync-listings-bot.yml: main へのマージ後 --write して bot コミット
- 4 ファイルにマーカー埋め込み、現状の listing を再生成済み
- CONTRIBUTING.md / CLAUDE.md / _template/index.html に運用ノート追記

PR #31 で手動同期した同期漏れの再発防止。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(listings): regenerate sitemap lastmod after merge

main 取り込み後の各講義 index.html の最終コミット日 (2026-05-19) を
sitemap.xml に反映する。

* fix(automation): harden listing sync per code review

Codex レビュー (PR #36) で出た 6 点を反映:

1. HTML/XML エスケープ: render_sitemap / render_index_html / render_readme_table
   が title / description / dir_name を生で埋めていたため、`<`, `&`, `"` 等が
   入った瞬間に root index.html や sitemap.xml の構造が壊れるリスクがあった。
   html.escape() を出力側で適用。読み込み側は html.unescape() で正規化して
   ダブルエンコードを避ける。
2. Marker injection 対策: title / description に '<!-- listings:auto'、改行、
   '|' (markdown table 破壊要因) のいずれかが入っていたら fail させる
   pre-flight validation (validate_metadata) を追加。
3. README table 破壊対策: 1+2 と同系統。`|` を pre-flight で reject + 角括弧を
   markdown 側でエスケープ。
4. discover_lectures が NN-slug/index.html 不在を silently skip していたのを
   SystemExit に変更。壊れた lecture を見逃さない。
5. sync-listings-check.yml に permissions: contents: read を明示。
6. sync-listings-bot.yml の git add -A を 4 ファイル限定に絞り、
   concurrency group を追加して push race を防止。

---------

Co-authored-by: watanabe-kohei-jp <283722319+watanabe-kohei-jp@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant