ตัวสร้าง README
เริ่มจากเทมเพลตที่ได้แรงบันดาลใจจากโปรไฟล์จริง เปิดปิดส่วนต่างๆ แล้วคัดลอกไฟล์สามไฟล์ ตัวอย่างคือเอนจินตัวจริงที่ใช้ข้อมูลตัวอย่าง
ตัวอย่าง
Hi, I'm octocat 👋
I write code and share it here.
Tech stack
Contacts
ไฟล์
วางใน README ของรีโพโปรไฟล์ของคุณ (<login>/<login>) มาร์กเกอร์ช่วยให้ 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