Skip to content

テンプレートをリファクタリング#57

Merged
Ryoga-exe merged 1 commit into
mainfrom
refactor/typst
Jun 17, 2026
Merged

テンプレートをリファクタリング#57
Ryoga-exe merged 1 commit into
mainfrom
refactor/typst

Conversation

@Ryoga-exe

Copy link
Copy Markdown
Member

No description provided.

@Ryoga-exe
Ryoga-exe requested a review from oka4shi June 17, 2026 13:53
@oka4shi
oka4shi requested a review from Copilot June 17, 2026 14:00

@oka4shi oka4shi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

見た感じ問題なさそう
Copilotの指摘事項がなければマージしていいと思います

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Ryoga-exe
Ryoga-exe merged commit 6142acb into main Jun 17, 2026
4 checks passed
@Ryoga-exe
Ryoga-exe deleted the refactor/typst branch June 17, 2026 14:37
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.

3 participants