テンプレートをリファクタリング#57
Merged
Merged
Conversation
oka4shi
approved these changes
Jun 17, 2026
oka4shi
left a comment
Contributor
There was a problem hiding this comment.
見た感じ問題なさそう
Copilotの指摘事項がなければマージしていいと思います
Contributor
There was a problem hiding this comment.
Pull request overview
テンプレート内で重複していた定数(フォント設定・アセットパス・日付フォーマット・日本語判定用正規表現)を template/constants.typ に集約し、各モジュールから参照する形に整理したPRです。併せてページ番号処理の引数名タイポ修正と、記事テンプレート内の小さなリファクタリングが含まれます。
Changes:
template/constants.typを新設し、fonts/assets/date-format/jp-pattern を集約- 既存テンプレート(utils/cover/backcover/project)から定数定義や直書きパスを削除して import 参照へ変更
article.typの著者表示とカウンタ初期化処理を関数化して整理
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| template/utils.typ | 定数を constants.typ へ移動し import 化、ページ番号処理の actual-page タイポ修正、raw theme の参照を集約定数へ変更 |
| template/project.typ | 重複していた date-format 定義を削除(未使用) |
| template/cover.typ | 表紙画像パスを assets.cover に置換し constants.typ を import |
| template/constants.typ | フォント・アセットパス・日付フォーマット・日本語正規表現の共通定数を新規追加 |
| template/backcover.typ | date-format をローカル定義から import に変更、ロゴパスを assets.wordlogo に置換 |
| template/article.typ | 著者ラベル生成とカウンタリセットを関数化して重複を解消 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.