Konfiguration
profile-graphics.yml ist optional, aber der beste Weg, die Karten in der CI reproduzierbar zu halten.
Vollständiges Beispiel
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
Optionsgruppen
| Gruppe | Optionen |
|---|---|
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 listet die zu rendernden Karten in dieser Reihenfolge. Unter Karten findest du jede Karte und ihre Optionen unter cards.
calendar.timezone ist ein IANA-Name wie Europe/Berlin (Standard UTC). Er entscheidet, zu welchem Tag ein Ereignis gehört, wann eine Serie endet und welche Stunde die Karte zur produktiven Zeit zählt.
theme.background nimmt eine Farbe, transparent oder einen linearen Verlauf wie 30,#e96443,#904e95; siehe Verlaufshintergrund.
Das Review-Preset
review in charts wird zu summary, streak, calendar, langs, punch-card und repos erweitert, in dieser Reihenfolge: ein ganzer Profil-Überblick in einem Wort. Führe andere Karten davor oder danach auf; eine doppelt genannte Karte wird einmal gerendert.
charts: [review, activity]
CLI-Flags und Action-Inputs
Die meisten Optionen lassen sich ohne YAML setzen: Übergib sie als CLI-Flags oder als Inputs der GitHub Action. Flags und Inputs überschreiben die Konfigurationsdatei. Listen wie charts werden durch Kommas getrennt. provider.merge, eigene Designs, Farbüberschreibungen und Kartengrößen gibt es nur in YAML.
| Konfigurationspfad | CLI-Flag | Action-Input |
|---|---|---|
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
|
Kalenderfenster
calendar.mode legt die Daten fest, die jede Karte abdeckt. current-year (Standard) läuft von Januar bis Dezember dieses Jahres, last-year deckt das Vorjahr ab, und rolling zeigt die letzten zwölf Monate bis heute, wie die Grafik auf einem GitHub-Profil. calendar.year wählt ein Jahr und hat Vorrang vor dem Modus. Summen, Serien und die Kalenderkarte folgen dem Fenster, daher hält rolling eine Serie über den Jahreswechsel am Leben.
calendar:
mode: rolling
# year: 2025 picks one calendar year instead
timezone: Europe/Berlin
Kartensprache
calendar.locale ist ein BCP-47-Tag (Standard en-US). Kartenbeschriftungen sind in 30 Sprachen übersetzt (Arabisch, Hebräisch und Persisch werden von rechts nach links gezeichnet); jede andere Locale behält englische Beschriftungen. Zahlen, Daten, Monate, Wochentage und Dauern werden immer mit Intl in der gesetzten Locale formatiert.
Englisch
calendar:
locale: en
Russisch
calendar:
locale: ru
Deutsch
calendar:
locale: de
Spanisch
calendar:
locale: es
Französisch
calendar:
locale: fr
Portugiesisch
calendar:
locale: pt
Japanisch
calendar:
locale: ja
Chinesisch
calendar:
locale: zh
Paar aus Dunkel und Hell
Mit dem nativen Auto-Design wechselt jedes SVG bereits über prefers-color-scheme zwischen hell und dunkel. dark_mode_pair: true schreibt stattdessen zwei Dateien pro Karte, etwa streak-light.svg und streak-dark.svg, für ein <picture>-Element. Das gilt nur für das native Auto-Design; ein Preset oder ein eigenes Design schreibt eine Datei pro Karte.
theme:
mode: auto
native: true
dark_mode_pair: true
<picture>
<source media="(prefers-color-scheme: dark)" srcset="profile-graphics/streak-dark.svg" />
<img alt="Streak" src="profile-graphics/streak-light.svg" />
</picture>
Dashboard
output.layout: dashboard setzt jede Karte aus charts in ein Bild, dashboard.svg (oder PNG bzw. WebP), statt einer Datei pro Karte. output.columns legt fest, wie viele Karten in eine Zeile kommen, von 1 bis 4 (Standard 2).
charts: [streak, summary, langs, calendar]
output:
layout: dashboard
columns: 2
Rahmen und Titel
svg.frame entscheidet, was jede Karte umgibt. frame_radius rundet die Ecken (0 bis 40, Standard 8).
Rand
Der Standard: ein dünner Rand in der Farbe leerer Kalenderzellen.
svg:
frame: border
frame_radius: 8
Fenster
Eine Fensterleiste mit Ampel-Knöpfen und einem optionalen zentrierten Titel.
svg:
frame: window
frame_title: "{user}"
Kein Rahmen
Nur der Hintergrund, für Karten in deinem eigenen Layout.
svg:
frame: none
frame_title fügt einen Titel über der Karte hinzu (bis zu 120 Zeichen). Diese Platzhalter werden aus deiner Statistik gefüllt, mit Zahlen in der Kalender-Locale:
| Platzhalter | Wert |
|---|---|
{user}
| Nutzername |
{name}
| Anzeigename oder der Nutzername, wenn es keinen gibt |
{year}
| Jahr des Kalenderfensters |
{total}
| Beiträge im Fenster |
{active_days}
| Tage mit mindestens einem Beitrag |
{streak}
| Aktuelle Serie in Tagen |
{longest_streak}
| Längste Serie in Tagen |
{best_day}
| Meiste Beiträge an einem einzigen Tag |
{best_date}
| Datum dieses Tages |
{stars}
| Sterne deiner Repositorys |
{commits}
| Commits im Fenster |
{followers}
| Follower |
{top_language}
| Meistgenutzte Sprache |
Titel, Zahlen und Animation
svg.hide_title: true blendet die Überschrift auf jeder Karte aus, die eine hat. Pro Karte ersetzt title die Überschrift und hide_title blendet sie aus; siehe Kartentitel.
svg.number_format entscheidet, wie die Karten Zahlen schreiben: short (Standard) kürzt sie in der Kartensprache ab, etwa 1.2K, und long schreibt sie voll aus, etwa 1,247.
svg.animation fügt SVG-Karten eine Einblendanimation hinzu: fade blendet den Inhalt ein, und rise hebt ihn zusätzlich um ein paar Pixel an. animation_duration legt ihre Länge in Sekunden fest (0,2 bis 5, Standard 0,8). Besucher, deren System reduzierte Bewegung wünscht, sehen die Karte ohne sie, und PNG- und WebP-Dateien bewegen sich nie. Der Standard ist none.
svg:
hide_title: true
number_format: long
animation: rise
animation_duration: 0.8
Eine Konfiguration mit profile-snake teilen
extends zeigt auf eine andere YAML- oder JSON-Datei, relativ zur aktuellen. Sie wird zuerst gelesen, und die aktuelle Datei wird darübergelegt: Verschachtelte Abschnitte werden Schlüssel für Schlüssel zusammengeführt, Listen und Werte ersetzt. Halte das gemeinsame provider, calendar und theme in einer profile.yml und erweitere sie sowohl aus profile-graphics.yml als auch aus profile-snake.yml.
provider:
user: octocat
calendar:
mode: rolling
timezone: Europe/Berlin
theme:
preset: tokyo-night
extends: ./profile.yml
charts: [streak, summary, langs]
Schlüssel, die ein Tool nicht kennt, etwa snake oder charts, ignoriert das andere. Bis zu 8 Dateien können einander erweitern; ein Zyklus oder eine fehlende Datei endet mit einem Konfigurationsfehler. Der Playground und die Webkomponente lesen eine einzelne Konfiguration und folgen extends nicht.
Editor-Unterstützung
Füge diese Zeile am Anfang der Datei ein, um Vervollständigung und Validierung in Editoren zu bekommen, die den YAML Language Server verstehen; profile-graphics init schreibt sie für dich. profile-graphics schema gibt den Pfad des mit dem Paket gelieferten Schemas aus.
# yaml-language-server: $schema=https://unpkg.com/profile-graphics/profile-graphics.schema.json
provider:
user: octocat