ページタイトルが「今すぐ採用エントリー」になる問題を修正 - #24
Merged
Merged
Conversation
GitHub Pages 既定の jekyll-titles-from-headings が各ページの最初の見出しを page.title に採用する。README の先頭が `# **[今すぐ採用エントリー](...)**` だったため、これがタイトルとして採用されていた。 architect は site.title しか参照しないため表面化していなかったが、 cayman は page.title を優先するのでテーマ差し替えで顕在化した。 - README 先頭のエントリーリンクを見出しから通常の段落に変更 タイトルは次の見出し「NCDCのエンジニア採用に応募しませんか」になる h1 がページ内に2つある状態も解消される - ボタンの装飾を h1:first-of-type から p:first-of-type へ変更 - strip_title を有効化し、タイトルに使われた見出しを本文から除去 帯と本文に同じ見出しが二重に出る状態を全ページで解消する Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
タイトルが意図せず「今すぐ採用エントリー」になっていた問題に対して、原因(jekyll-titles-from-headings と cayman の page.title 優先)を踏まえた修正方針が明確で、再発防止まで含めて前向きに整理されているPRです。
Changes:
- README先頭のエントリー導線を見出しから段落に移し、ページタイトルの誤採用を回避
- CTAボタン装飾の対象を
h1:first-of-typeからp:first-of-typeに変更し、:focus-visibleも追加 titles_from_headings.strip_titleを設定し、帯と本文の見出し二重表示を解消
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | 先頭のエントリーリンクを見出しから段落へ変更し、ページタイトルの誤採用を回避 |
| assets/css/style.scss | CTAボタン装飾のセレクタを段落ベースに変更し、フォーカス時のスタイルも追加 |
| _config.yml | titles_from_headings.strip_title を有効化し、帯と本文の見出し重複を抑制 |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // GitHub Pages の jekyll-titles-from-headings が最初の見出しをページタイトルに | ||
| // 採用するため、このリンクは見出しにできない(見出しにするとタイトルが | ||
| // 「今すぐ採用エントリー」になる)。先頭の段落として置き、ここで装飾する | ||
| .main-content > p:first-of-type a { |
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.
概要
#23 のマージ後、公開ページのタイトルが「今すぐ採用エントリー」になっていました。
原因は GitHub Pages が既定で有効にしている
jekyll-titles-from-headingsです。このプラグインは各ページの最初の見出しをpage.titleに採用します。README の先頭が# **[今すぐ採用エントリー](...)**だったため、これがタイトルになっていました。architect は
site.titleしか参照しませんが、cayman はpage.titleを優先します。そのためテーマ差し替えで顕在化しました。変更内容
タイトルの修正
h1:first-of-typeからp:first-of-typeへ変更(見た目は変わりません)見出しの重複解消
調査の過程で、帯と本文に同じ見出しが二重に表示されていることが全ページで判明しました。
# 募集職種_config.ymlにtitles_from_headings.strip_titleを追加して対応しました。md ファイルには触れていません。確認したこと
検証手段の修正
#23 では、プレビューを組み立てるスクリプトがタイトルを固定値で埋め込んでいたため、この不具合を検出できませんでした。ローカルの README の最初の見出しからタイトルを導出するよう改め、同種の見落としが起きないようにしています。
未確認事項
strip_titleの効果は GitHub Pages のビルドを通さないと最終確認ができないため、マージ後の確認になります。🤖 Generated with Claude Code