我们在逛GitHub的时候常常会看到一些很漂亮的个人主页,包含了使用者在GitHub的活动情况、个人信息以及联系方式等内容。那么我们应该怎样打造应该个性化的GitHub主页呢?就从本文开始吧!
步骤:
修改刚刚生成的README文件,其内容即可展示到你的主页
因为markdown文件支持HTML语法,你可以发挥自己的所能设计主页
在这里我介绍几个可能为你所用的API
markdown是支持emoji表情输入的,我们可以在书写个人简介时加入一些表情
如:Hi there , I 'm xxx
emoji表情可以直接粘贴,也可以使用 :标签名称:
的格式引入
上面的挥手表情就是键入 :wave:
来引入的
要找对应的表情名称,可以访问这个网站:https://www.webfx.com/tools/emoji-cheat-sheet/
输入要查找的表情,或者选择中意的表情直接粘贴过来
https://github.com/anuraghazra/github-readme-stats
统计你的GitHub活动情况:PR、Star、贡献等等
可选主题有:dark
, radical
, merko
, gruvbox
, tokyonight
, onedark
, cobalt
, synthwave
, highcontrast
, dracula
引入方式:放到
标签里,在 src
属性进行配置即可
<img align="center" src="https://github-readme-stats.vercel.app/api?username=你的用户名&show_icons=true&theme=radical"/>
<img align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=你的用户名&theme=radical&layout=compact" />
还可以放置你最想展示的仓库,使用方式:
点击即可跳转到对应仓库
[](你仓库的url)
https://shields.io/

https://github.com/Ashutosh00710/github-readme-activity-graph



https://github.com/songquanpeng/stats-cards




https://github.com/DenverCoder1/readme-typing-svg
<img src="https://readme-typing-svg.herokuapp.com/?lines=消息1;消息2&font=Roboto" />
%20
代替GITHUB_TOKEN
的tokenadmin:repo_hook
、repo
和 workflow
权限.workflow
文件夹下建立 .yml
文件,写好配置即可定时允许更新https://github.com/yoshi389111/github-profile-3d-contrib

name: GitHub-Profile-3D-Contrib
on:
schedule: # 02:30 IST == 21:00 UTC
- cron: "0 21 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v2
- uses: yoshi389111/github-profile-3d-[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "generated"
git push
https://github.com/Platane/snk
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/output/github-snake-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="/output/github-snake.svg">
<img alt="github-snake" src="/output/github-snake.svg">
picture>
name: generate animation
on:
# run automatically every 12 hours
schedule:
- cron: "0 */12 * * *"
# allows to manually run the job at any time
workflow_dispatch:
# run on every push on the master branch
push:
branches:
- master
jobs:
generate:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# generates a snake game from a github user () contributions graph, output a svg animation at
- name: generate github-contribution-grid-snake.svg
uses: Platane/snk/svg-only@v2
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-snake.svg
dist/github-snake-dark.svg?palette=github-dark
# push the content of to a branch
# the content will be available at https://usercontent.githubfast.com/raw//// , or as github page
- name: push github-contribution-grid-snake.svg to the output branch
uses: crazy-max/ghaction-github-[email protected]
with:
target_branch: output
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}