README 生成器
从受真实主页启发的模板开始,开关各个章节,然后复制三个文件。预览使用真实引擎和演示数据。
预览
Hi, I'm octocat 👋
I write code and share it here.
Tech stack
Contacts
文件
粘贴到你的个人主页仓库(<login>/<login>)的 README 中。借助这些标记,profile-graphics readme --update 只会刷新这一部分。
README.md
<!-- profile-graphics:start -->
## Hi, I'm octocat 👋
I write code and share it here.
## Tech stack
<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/octocat/octocat/output/stack-dark.svg"><img src="https://raw.githubusercontent.com/octocat/octocat/output/stack-light.svg" alt="Stack" width="100%"></picture></p>
## Contacts
<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/octocat/octocat/output/contacts-dark.svg"><img src="https://raw.githubusercontent.com/octocat/octocat/output/contacts-light.svg" alt="Contacts" width="100%"></picture></p>
<!-- profile-graphics:end -->
在同一仓库中保存为 profile-graphics.yml,然后编辑名字、项目和联系方式。
profile-graphics.yml
version: 2
provider:
type: github
user: octocat
theme:
dark_mode_pair: true
style:
preset: minimal
charts:
- card: stack
id: stack
layout: badges
groups:
Languages:
- python
- cpp
- bash
Data and tools:
- postgresql
- git
- docker
- card: links
id: contacts
contacts:
- github: octocat
保存为 .github/workflows/profile-graphics.yml。它每天渲染卡片,并发布到 output 分支。
.github/workflows/profile-graphics.yml
name: Profile graphics
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: mikhailkhorokhorin/profile-graphics@v1
with:
config: profile-graphics.yml
token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: output