地域Ruby会議のレポートの通し番号を自動採番にする#671
Draft
neko314 wants to merge 6 commits into
Draft
Conversation
指定した投稿の title 文字列だけを返す。post_url が URL を 返すのと対になり、他記事のリンクテキストを post.title から 動的に同期させるために使う。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
「RegionalRubyKaigi レポート (NN) ...」というタイトルの (NN) を created_on 順で並べてビルド時に書き換える。記事の title と short_title 両方が対象。ソース側は (NUM) プレースホルダでも 既存の (12) でも構わない。「(特別編)」のような数字でも NUM でもないものはそのまま残す。 並行 PR で番号が重複したり飛んだりするのを防ぐのが目的。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
自動採番プラグインの結果に合わせてソースの (NN) を更新。 created_on 順に並べると次の差分になる: - 松江 Ruby 会議 11: (87) -> (85) - 福岡 Rubyist 会議 04: (85) -> (86) - TokyuRuby 会議 15: (86) -> (87) - 東京 Ruby 会議 12: (88) -> (90) これで 88 重複と 90 欠番が解消される。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
各号 index.md にハードコードされていた
[RegionalRubyKaigi レポート (NN) ...]({% post_url PATH %})
を
[{% post_title PATH %}]({% post_url PATH %})
に置換した (37 ファイル / 計 90 リンク)。これで自動採番プラグインが
記事タイトルを書き換えると目次側も追従するようになる。
0045 号の自己参照になっていた壊れた markdown リンク 2 件も
同じ形に直してある。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
editing_tools/template/index.md.erb の TOC エントリを
リテラルな article.title 直書きから {% post_title PATH %} 経由に変更。
新規号生成時の各号 index.md が、既存の index.md と同じ形になる。
RegionalRubyKaigi レポートではソースの (XX) プレースホルダや
古い番号が TOC に混入することを防げる。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 地域Ruby会議レポートのタイトルは (NUM) プレースホルダで書けば ビルド時に created_on 順で自動採番される旨を追記。 - 参照先のタイトル変更に追従させたい場合は post_url ではなく post_title を使う旨を追記。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3bec6f5 to
34431b2
Compare
Contributor
|
手元でさっと試してみたところ、既に #665 とコンパチプルな(採番後のタイトルが表紙やサイドバーの目次に表示される)ようです。すごい!この変更ではプラグインとして |
Contributor
Author
|
おお、早速ご確認くださりありがとうございます!
私自身もこれは意識したのですが、満たしたい要件ドバーッと伝えたらClaudeくんが実現してくれました🤖 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.