完全な例

profile-graphics.yml
provider:
  type: github
  user: octocat
  include_private: false

charts: [streak, summary, langs, calendar]

output:
  dir: profile-graphics
  format: svg
  layout: separate
  raster_background: auto

calendar:
  mode: rolling
  timezone: Europe/Berlin
  locale: en

theme:
  mode: auto
  native: true
  dark_mode_pair: false

svg:
  frame: border
  frame_radius: 8
  frame_title: ""
  hide_title: false
  number_format: short
  animation: none
  accessibility: true

cards:
  langs:
    style: donut
    count: 6
    exclude: [HTML, CSS]
  summary:
    metrics: [stars, commits, prs, reviews]
  calendar:
    weeks: 52
    show_months: true

オプションのグループ

グループ オプション
provider type, user, token, base_url, source, include_private, include_forks, exclude_repos, affiliations, merge
output dir, prefix, format, layout, columns, raster_background
calendar mode, year, timezone, locale
theme preset, custom, mode, native, dark_mode_pair, background, colors
svg frame, frame_radius, frame_title, hide_title, number_format, animation, animation_duration, accessibility
cards activity, langs, streak, summary, productive_time, punch_card, calendar, calendar_3d, profile_details, profile_card, trophy, repos, coding_time, coding_list, views

charts には描画するカードをその順で並べます。各カードと cards のオプションはカードを参照してください。

calendar.timezone は Europe/Berlin のような IANA 名です(デフォルトは UTC)。イベントがどの日に属するか、連続記録がいつ途切れるか、生産的な時間帯カードがどの時間を数えるかを決めます。

theme.background は色、transparent、または 30,#e96443,#904e95 のような線形グラデーションを受け付けます。グラデーション背景を参照してください。

review プリセット

charts の review は summary、streak、calendar、langs、punch-card、repos にこの順で展開されます。1 語でプロフィール全体を振り返れます。他のカードはその前後に並べてください。2 回出てくるカードは 1 回だけ描画されます。

yaml
charts: [review, activity]

CLI フラグと Action の入力

ほとんどのオプションは YAML を編集せずに設定できます。CLI フラグか GitHub Action の入力として渡してください。フラグと入力は設定ファイルより優先されます。charts のようなリストはカンマ区切りです。provider.merge、カスタムテーマ、色の上書き、カードのサイズは YAML でしか設定できません。

設定のパス CLI フラグ Action の入力
provider.type --provider provider
provider.user --user user
provider.token --token token
provider.base_url --base-url base_url
provider.source --source source
provider.include_private --include-private include_private
provider.include_forks --include-forks include_forks
provider.exclude_repos --exclude-repos exclude_repos
provider.affiliations --affiliations affiliations
provider.scope --scope scope
provider.include_orgs --include-orgs include_orgs
provider.exclude_orgs --exclude-orgs exclude_orgs
provider.count_private --count-private count_private
provider.count_own_stars --count-own-stars count_own_stars
charts --charts charts
output.dir --output output
output.prefix --prefix prefix
output.format --format format
output.layout --layout layout
output.columns --dashboard-columns dashboard_columns
output.raster_background --raster-background raster_background
calendar.year --year year
calendar.mode --calendar-mode calendar_mode
calendar.timezone --timezone timezone
calendar.locale --locale locale
theme.preset --theme theme
theme.mode --theme-mode theme_mode
theme.native --native-theme native_theme
theme.dark_mode_pair --dark-mode-pair dark_mode_pair
theme.background --background background
svg.frame --frame frame
svg.frame_radius --frame-radius frame_radius
svg.frame_title --frame-title frame_title
svg.hide_title --hide-title hide_title
svg.animation --animation animation
svg.animation_duration --animation-duration animation_duration
svg.number_format --number-format number_format
svg.accessibility --accessibility accessibility
cards.activity.days --activity-days activity_days
cards.activity.show_grid --activity-grid activity_grid
cards.activity.show_points --activity-points activity_points
cards.activity.show_average --activity-average activity_average
cards.langs.count --langs-count langs_count
cards.langs.style --langs-style langs_style
cards.langs.exclude --langs-exclude langs_exclude
cards.summary.metrics --summary-metrics summary_metrics
cards.streak.mode --streak-mode streak_mode
cards.streak.exclude_days --exclude-days exclude_days
cards.streak.range --streak-range streak_range
cards.summary.show_rank --summary-rank summary_rank
cards.summary.rank_style --rank-style rank_style
cards.punch_card.week_start --week-start week_start
cards.productive_time.hour_format --hour-format hour_format
cards.calendar.weeks --calendar-weeks calendar_weeks
cards.calendar.show_months --calendar-months calendar_months
cards.profile_details.show_chart --profile-chart profile_chart
cards.profile_card.show_avatar --profile-avatar profile_avatar
cards.trophy.columns --trophy-columns trophy_columns
cards.trophy.max --trophy-max trophy_max
cards.repos.source --repos-source repos_source
cards.repos.count --repos-count repos_count
cards.calendar_3d.weeks --calendar-3d-weeks calendar_3d_weeks
cards.coding_time.days --coding-days coding_days
cards.coding_list.count --coding-count coding_count
cards.views.style --views-style views_style
cards.views.label --views-label views_label
cards.views.start --views-start views_start

カレンダー期間

calendar.mode は各カードが対象とする日付を決めます。current-year(デフォルト)は今年の 1 月から 12 月まで、last-year は前年、rolling は GitHub プロフィールのグラフのように今日までの直近 12 か月です。calendar.year は 1 年を選び、モードより優先されます。合計、連続記録、カレンダーカードは期間に従うので、rolling なら年をまたいでも連続記録が続きます。

yaml
calendar:
  mode: rolling
  # year: 2025 picks one calendar year instead
  timezone: Europe/Berlin

カードの言語

calendar.locale は BCP 47 タグです(デフォルトは en-US)。カードのラベルは 30 言語に翻訳されています(アラビア語、ヘブライ語、ペルシア語は右から左に描かれます)。それ以外のロケールでは英語のラベルのままです。数値、日付、月、曜日、期間は常に、設定したロケールで Intl によって整形されます。

英語

英語

yaml
calendar:
  locale: en
ロシア語

ロシア語

yaml
calendar:
  locale: ru
ドイツ語

ドイツ語

yaml
calendar:
  locale: de
スペイン語

スペイン語

yaml
calendar:
  locale: es
フランス語

フランス語

yaml
calendar:
  locale: fr
ポルトガル語

ポルトガル語

yaml
calendar:
  locale: pt
日本語

日本語

yaml
calendar:
  locale: ja
中国語

中国語

yaml
calendar:
  locale: zh

ダークとライトのペア

ネイティブの自動テーマでは、どの SVG もすでに prefers-color-scheme でライトとダークを切り替えます。dark_mode_pair: true にすると、代わりに <picture> 要素用にカードごとに streak-light.svg と streak-dark.svg のような 2 つのファイルを書き出します。これはネイティブの自動テーマにだけ適用され、プリセットやカスタムテーマではカードごとに 1 ファイルです。

yaml
theme:
  mode: auto
  native: true
  dark_mode_pair: true
README.md
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="profile-graphics/streak-dark.svg" />
  <img alt="Streak" src="profile-graphics/streak-light.svg" />
</picture>

ダッシュボード

output.layout: dashboard は、カードごとに 1 ファイルではなく、charts のすべてのカードを 1 枚の画像 dashboard.svg(または PNG、WebP)にまとめます。output.columns で 1 行のカード数を 1〜4 で決めます(デフォルトは 2)。

yaml
charts: [streak, summary, langs, calendar]

output:
  layout: dashboard
  columns: 2

フレームとタイトル

svg.frame は各カードを囲むものを決めます。frame_radius で角を丸めます(0〜40、デフォルトは 8)。

枠線

枠線

デフォルト: カレンダーの空のセルと同じ色の細い枠線。

yaml
svg:
  frame: border
  frame_radius: 8
ウィンドウ

ウィンドウ

信号機ボタンと、任意で中央のタイトルを持つウィンドウバー。

yaml
svg:
  frame: window
  frame_title: "{user}"
フレームなし

フレームなし

背景だけ。自分のレイアウトに組み込むカード向けです。

yaml
svg:
  frame: none

frame_title はカードの上にタイトルを追加します(最大 120 文字)。次のプレースホルダーは統計から埋められ、数値はカレンダーのロケールで書かれます:

プレースホルダー 値
{user} ユーザー名
{name} 表示名。なければユーザー名
{year} カレンダー期間の年
{total} 期間内のコントリビューション
{active_days} コントリビューションが 1 回以上あった日数
{streak} 現在の連続記録(日数)
{longest_streak} 最長の連続記録(日数)
{best_day} 1 日で最も多かったコントリビューション数
{best_date} その日の日付
{stars} リポジトリのスター数
{commits} 期間内のコミット
{followers} フォロワー
{top_language} 最もよく使う言語

タイトル、数値、アニメーション

svg.hide_title: true は見出しのあるすべてのカードで見出しを隠します。カードごとに title で見出しを置き換え、hide_title で隠せます。カードのタイトルを参照してください。

svg.number_format はカードでの数値の書き方を決めます。short(デフォルト)はカードのロケールで 1.2K のように短縮し、long は 1,247 のように完全な形で書きます。

svg.animation は SVG カードに登場アニメーションを付けます。fade は内容をフェードインし、rise はさらに数ピクセル持ち上げます。animation_duration で長さを秒で指定します(0.2〜5、デフォルトは 0.8)。システムで視差効果を減らす設定をしている訪問者にはアニメーションなしで表示され、PNG と WebP は動きません。デフォルトは none です。

yaml
svg:
  hide_title: true
  number_format: long
  animation: rise
  animation_duration: 0.8

profile-snake と設定を共有する

extends は現在のファイルからの相対パスで別の YAML または JSON ファイルを指します。そちらが先に読まれ、現在のファイルがその上にマージされます。入れ子のセクションはキーごとにマージされ、リストと値は置き換えられます。共有する provider、calendar、theme を 1 つの profile.yml に置き、profile-graphics.yml と profile-snake.yml の両方からそれを拡張してください。

profile.yml
provider:
  user: octocat
calendar:
  mode: rolling
  timezone: Europe/Berlin
theme:
  preset: tokyo-night
profile-graphics.yml
extends: ./profile.yml
charts: [streak, summary, langs]

snake や charts のように一方のツールが知らないキーは、もう一方では無視されます。互いに拡張できるファイルは最大 8 つです。循環やファイルの欠落は設定エラーで止まります。プレイグラウンドと Web コンポーネントは単一の設定を読み、extends はたどりません。

エディターのサポート

YAML language server に対応したエディターで補完と検証を使うには、ファイルの先頭にこの行を追加します。profile-graphics init が自動で書き込みます。profile-graphics schema はパッケージに同梱されたスキーマのパスを表示します。

yaml
# yaml-language-server: $schema=https://unpkg.com/profile-graphics/profile-graphics.schema.json
provider:
  user: octocat