feat/add-page-titles-for-browser-tabs#42
feat/add-page-titles-for-browser-tabs#42pirasan023 wants to merge 2 commits intocoderdojo-japan:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
各ページのフロントマターに title/subtitle を追加し、head.html 側の <title>(ブラウザタブ)にページタイトルが出るようにする変更です。合わせて、ヒーロー表示の参照を新旧キー両対応にしています。
Changes:
- 各ページのフロントマターを
hero_title/hero_subtitle→title/subtitleに移行 _layouts/default.htmlのヒーロー表示をhero_*が無い場合にtitle/subtitleを参照するよう更新sponsor-smartone.md(スポンサー個別ページ)を新規追加、404.htmlのタグ不整合を修正
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| travel-support.md | title/subtitle へ移行してタブタイトル表示を有効化 |
| staff.md | 同上 |
| sponsors.md | 同上 |
| sponsor-smartone.md | スポンサー個別ページを新規追加(title/subtitle あり) |
| register.md | 同上(redirect_from 維持) |
| privacy.md | 同上(redirect_from 維持) |
| news.md | 同上 |
| events.md | 同上 |
| display-rules.md | 同上 |
| contact.md | 同上 |
| conduct.md | 同上 |
| about.md | 同上 |
| _layouts/default.html | ヒーロー表示を新旧キー両対応に更新 |
| _archives/apply.md | title/subtitle へ移行 |
| 404.html | title/subtitle へ移行+見出しタグの閉じ忘れ修正 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --- | ||
| layout: default | ||
| title: "株式会社SmartOne" | ||
| subtitle: "Gold Sponsor" | ||
| --- |
There was a problem hiding this comment.
The PR description only mentions renaming hero_title/hero_subtitle to title/subtitle, but this PR also adds a new sponsor page. Please either update the PR description to include this new page (and intended URL/linking), or move it to a separate PR to keep the change focused.
| <h1 class="hero-title">{{ page.hero_title | default: page.title }}</h1> | ||
| <p class="hero-subtitle">{{ page.hero_subtitle | default: page.subtitle }}</p> |
There was a problem hiding this comment.
Since this PR is migrating pages to title/subtitle, the fallback order here should prefer the new keys first to avoid mismatches when both old and new front-matter fields are present. Consider switching to page.title | default: page.hero_title and page.subtitle | default: page.hero_subtitle.
| <h1 class="hero-title">{{ page.hero_title | default: page.title }}</h1> | |
| <p class="hero-subtitle">{{ page.hero_subtitle | default: page.subtitle }}</p> | |
| <h1 class="hero-title">{{ page.title | default: page.hero_title }}</h1> | |
| <p class="hero-subtitle">{{ page.subtitle | default: page.hero_subtitle }}</p> |
| subtitle: "Gold Sponsor" | ||
| --- | ||
|
|
||
| <img src="/img/contests/sponsor-logos/smartone.svg" alt="SmartOne-Logo" class="pt-12 pb-12 mx-auto mb-8 max-h-100"> |
There was a problem hiding this comment.
max-h-100 is not defined in the repo’s CSS and isn’t a standard Tailwind utility, so this class will have no effect and the sponsor logo may render at an unintended size. Use a valid Tailwind class (e.g., max-h-24/max-h-32) or an arbitrary value (max-h-[100px]), or add a corresponding CSS rule.
| <img src="/img/contests/sponsor-logos/smartone.svg" alt="SmartOne-Logo" class="pt-12 pb-12 mx-auto mb-8 max-h-100"> | |
| <img src="/img/contests/sponsor-logos/smartone.svg" alt="SmartOne-Logo" class="pt-12 pb-12 mx-auto mb-8 max-h-[100px]"> |
|
@pirasan023 こちらご都合の良いタイミングでマージしていただき、念のためデプロイ後の本番環境でもご確認いただけると良さそうです!! (影響範囲が比較的大きい PR だと思うので、本 PR については念のため本番環境でも確認しておいた方が良さそう)✅✨ cc/ @ta1yo1022 |
概要
添付写真のように、全てのページでページタイトルが表示されるようになりました。

変更部分
hero_title → title,hero_subtitle → subtitleと変更し、titleの部分をページタイトルとしています。