Github Profile Readme 美化效果汇总

本贴最后更新于 1144 天前,其中的信息可能已经天翻地覆

语雀版本:https://www.yuque.com/achuan-2/kclygn/dq718n

这是我目前的 Github 首页

image.png

酷吧,虽然咱代码不会写,首先气势不能输,逼格总是要先装起来的,装着装着,说不定,就会写代码了呢!!!(大误 😄)


0 准备工作

需要新建一个和 Github 用户名相同的仓库,新建时会有下面这样的提示

image.png

默认生成的 Readme 有注释文字,但是咱不用它(或许你想要在 Readme 简要介绍自己,也可)


<!--
**Achuan-2/Achuan-2** is a ✨ _special_ ✨ repository because its `README.md` (this file) appears on your GitHub profile.

Here are some ideas to get you started:

- 🔭 I’m currently working on ...
- 🌱 I’m currently learning ...
- 👯 I’m looking to collaborate on ...
- 🤔 I’m looking for help with ...
- 💬 Ask me about ...
- 📫 How to reach me: ...
- 😄 Pronouns: ...
- ⚡ Fun fact: ...
-->

接下来开搞吧

1 打字特效

Github 地址:DenverCoder1/readme-typing-svg

打字特效生成网站:Readme Typing SVG - Demo Site

image.png

效果图:

然后把生成的代码粘贴进去 Readme

<p align="center">
   <img src="https://readme-typing-svg.herokuapp.com?color=28696B&size=21&center=true&lines=%E9%97%AA%E9%97%AA%E5%8F%91%E4%BA%AE%EF%BC%8C%E9%97%AA%E9%97%AA%E5%8F%91%E4%BA%AE;Achuan-2+%E7%A5%9D%E4%BD%A0%E4%BB%8A%E6%97%A5%E6%84%89%E5%BF%AB" alt="typing-svg">
</p>

2 社交粉丝数目

用 Substats 配合 Shields.io 制作动态小牌子

📜 教程:用 Substats 和 Shields.io 为你的个人主页定制动态数据小牌子 - 少数派 (sspai.com)

📜Substats API 文档:Home | Substats Docs (spencerwoo.com)

创建动态图标方法:点击进入这个网页 shields.io dynamic-badge

  • data type 选择 json
  • label 选择数据牌左侧你想展示的东西,比如我想展示的是 GitHub
  • data url,找到自己想展示的 API URL,比如我的 GitHub URL 就是:https://api.spencerwoo.com/substats/?source=github&queryKey=Achuan-2。一般都只需要修改 source 后面的目标服务器以及 queryKey 后面的请求数据标签,前者一般都是平台名,后者一般都是用户名。
  • query 填:$.data.totalSubs
  • color 填写一个十六进制的颜色代码,前面不加#。
  • 剩下两个分别是数据牌右侧展示数据的前缀和后缀,前缀可以不填,后缀可选填 followers

image.png

生成结果点击此处查看:Github Followers

我的代码,在 Readme 放入

<p align="center">
<a title="Hits" target="_blank" href="https://github.com/Achuan-2/Achuan-2"><img src="https://hits.b3log.org/Achuan-2/Achuan-2.svg" ></a>
<a title="github" target="_blank" href="https://github.com/Achuan-2"><img src="https://img.shields.io/badge/dynamic/json?label=GitHub&suffix=%20followers&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dgithub%26queryKey%3DAchuan-2&labelColor=282c34&color=353940&logo=github&longCache=true" ></a>
<a title="weibo" target="_blank" href="https://weibo.com/2139813304/profile"><img src="https://img.shields.io/badge/dynamic/json?labelColor=e71f19&color=353940&label=Weibo&suffix=%20followers&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dweibo%26queryKey%3D2139813304&logo=sina-weibo&longCache=true" ></a>
<a title="zhihu" target="_blank" href="https://www.zhihu.com/people/achuan-2"><img src="https://img.shields.io/badge/dynamic/json?color=353940&labelColor=0084ff&label=Zhihu&suffix=%20followers&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dzhihu%26queryKey%3Dachuan-2&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjMzMjY1Mzc4NzU2IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAy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wLjh6IiBmaWxsPSIjZmZmZmZmIiBwLWlkPSI1MTU0Ij48L3BhdGg+PC9zdmc+&longCache=true" ></a>
<a title="bilibili" target="_blank" href="https://space.bilibili.com/349243695"><img src="https://img.shields.io/badge/dynamic/json?color=353940&labelColor=f27596&label=Bilibili&suffix=%20followers&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dbilibili%26queryKey%3D349243695&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAD7ElEQVR4nO2dW9WrMBCFK6ESkFAJSKiESqgEHCABCZWAhEpAAhL2ecik5dDc/pXLBDLfWnlqy0xmJ5BMQnq5CIIgCIIgCIIgCIIgCEIBAHQAemYfrgCunD6wAKAHsEKxALgx+bCQD8/S9tmgVqeDr1lLigDgZvDhXso+K9TyTBQRwRJ8AHjntl0Flh5QRAQK/mKxPeayWx2OXpBNBKiHvi34b7T2MC4pAvW6twR/RwkRKPizBN8CgEcuESj4Lwm+BwBjahEk+H8EwJRKhOaCDzW8e1JLfkUUH1NgmR3XmHffHR1l+72BSs8d7w8U+JDAnZERQMcV+CtUi7dNqFqibB4J7vtrq7xKCuAasbTMXCL4T+5aVk6+2xHUrWdhruAR6HIJcOeu2UHI8zyAe2ytWfEdWz9PVvQ8YAmIQ5dDAB9LFsMVAv8oMO2zAGrC5WNIarRiAuKR9jYEd9pY08aa6uUzIHGRdkgKd8pY0yc1WjEBAqypDYoAG0QAZkQAZkQAZkQAZk4vANQenjsSzS3I/wcSbXU5jQBUkRtdf4Rar90v8kSv3+I3ffCCSpk8I/w+lgDkdI/v2rEp2CaiWm1AsDQLlDAD+dlFXLMeAaCSeLZdaSFE5VUQNot38cKuEeBgAsSuG0flVZBmEanbXfNQAsS0fgBYIn2fIu3/BBMHEyBmDXlFfA8IzeHb+Ems4WAChKykrVA9ZfsQTL57jXzRg4A5wC/A8N4ADiZAZwm2XjW75Qh2KOTfA0p4kygPw28OJcCVgn3nDnYo2EwEYRgGH0qAMyICMCMCMCMCMCMCMCMCMCMCfP3qwHDOQ4AAUekTk8FaBRihJnZdYbvtCGC7LvmkM63GjVDINPFrQgCq5ETXfmMzI90FXzPvfqt7x4rEu/ZaEcCUxFvgz2zO+BUn6UkoaEEAsptiMSX5e8FoRYCN7cVgb4Vq7U/H50Pq4JNP7Qiw8UFnJwcK+tXy+Wj6PLEvPgHSHv5UgwA1IQIwwyFAyLJin9RoxYgAzAQIkPwNmf26busC+OIx5TDqo5nDT+F/SS/9CYzwb+No49zNy2evkYv0LywGGAXUvp6eSneycqOic0w20k7CNgKE7jJunSGLACTCxF27ylmQc98T5MQUH49swd+I0HPXslLKnT0N+wnkrTKi9JZL/L9i1SorMmdeQ4TQQ7OFMxIMzGD45w8nUL1im7efENZLJpgPSw0pfz0cdt4U3230Td/Tvx2R6d2FrHhEWLkq5PELOMsRPHCPnAZGv1xJteL7jbJiaW3sB2nDvPC/osSYvjRQz4cJ6n7KO3rYQL7M+L6nVtfDVRAEQRAEQRAEQRAEIZ5/SAXmdfXaoQsAAAAASUVORK5CYII=&longCache=true" ></a>
<a title="coolapk" target="_blank" href="https://www.coolapk.com/u/787649"><img src="https://img.shields.io/badge/dynamic/json?color=30343b&labelColor=17a15e&label=Coolapk&suffix=%20followers&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dcoolapk%26queryKey%3D787649&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxkZWZzPjxzdHlsZS8+PC9kZWZzPjxwYXRoIGQ9Ik0xMjcuODkzIDQyNi42NjdjMjkuOTItNjYuOTg3IDk0LjUwNy0xMTYuNjk0IDE2Ni40LTEzMC4zNDcgNTUuNzg3LT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0xMTYuMzczLTkuOTczLTUzLjQ5NC0xOS4xNDctMTAwLjMyLTU4LjcyLTEyNC41ODctMTEwLjU2LTI4LjIxMy01Ni4xMDctMjYuNzczLTEyNS4wMTQuMjEzLTE4MS4yOHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=&longCache=true" ></a>
</p>

知乎、哔哩哔哩、酷安的图标,我是使用 base64 将 svg 进行转码的,所以很长~~

3 GitHub Stats Card && Most used languages

Github 地址:anuraghazra/github-readme-stats

在 Readme 放入

<div align="center">
<span>  </span>
<img height="170px" src="https://github-readme-stats.vercel.app/api?username=Achuan-2" /><span>  </span><img height="170px" src="https://github-readme-stats.vercel.app/api/top-langs/?username=Achuan-2&layout=compact&langs_count=8" />
<span>  </span>
</div>

4 GitHub streak(GitHub 连续打卡)

Github 地址:DenverCoder1/github-readme-streak-stats

在 Readme 放入

<div align="center">
    <img  src="https://github-readme-streak-stats.herokuapp.com/?user=Achuan-2" />
</div>

5 GitHub Readme Activity Graph (GitHub 活动统计图)

Github 地址:Ashutosh00710/github-readme-activity-graph

在 Readme 放入

<div align="center">
    <img src="https://activity-graph.herokuapp.com/graph?username=Achuan-2&theme=minimal" />
</div>

6 贪吃蛇吃绿点

Github 地址: Platane/snk

方法:

  1. 创建./.github/workflows/generate_snake.yml 文件,填入下面的代码,不需要修改
    # GitHub Action for generating a contribution graph with a snake eating your contributions.
    
    name: Generate Snake
    
    
    on:
      watch:
        types: started
      schedule:
        - cron:  '0 0 * * *'
    
    
    jobs:
      build:
        runs-on: ubuntu-latest
    
        steps:
          - name: Checkout
            uses: actions/checkout@v2.3.4
    
          - name: Generate Snake
            uses: Platane/snk@master
            id: snake-gif
            with:
              github_user_name: ${{ github.repository_owner }}
              gif_out_path: ./assets/github-contribution-grid-snake.gif
              svg_out_path: ./assets/github-contribution-grid-snake.svg
    
          - name: Push to GitHub
            uses: EndBug/add-and-commit@v7.2.1
            with:
              branch: main
              message: 'Generate Contribution Snake'
    
  2. 在 Readme 放入
    • Gihub 默认地址
      <div align="center"><img src="https://raw.githubusercontent.com/Achuan-2/Achuan-2/main/assets/github-contribution-grid-snake.svg" ></div>
      
    • cdn 加速版本,但是 CDN 有缓存,需要手动刷新浏览器才能看到更新
      <div align="center"><img src="https://cdn.jsdelivr.net/gh/Achuan-2/Achuan-2/assets/github-contribution-grid-snake.svg" ></div>
      

7 更新 hexo 博客和豆瓣动态

资料:利用 GitHub actions 在主页展示最近动态 - 知乎 (zhihu.com)

image.png

  1. 创建 ./.github/workflows/update-events.yml 文件,填入,修改 blog_rss_linkdouban_name
    name: Update events
    
    on:
      watch:
        types: started
      schedule:
        - cron:  '0 0 * * *'
    
    jobs:
      update-social:
        runs-on: ubuntu-latest
        steps:
          - name: Social Readme
            uses: zylele/social-readme@master
            with:
              blog_rss_link: https://achuan-2.top/atom.xml
              blog_limit: 10
              douban_name: sjx270992395
              douban_limit: 10
    
  2. 在 Readme 放入
    ## 📺Social
    
    <table>
    <tbody>
       <tr>
           <td  valign="top" width="50%">
    
    ### 📝<a href="https://achuan-2.github.io/" target="_blank">Recent Blog</a>
    
    <!-- START_SECTION:blog -->
    
    <!-- END_SECTION:blog -->
    </td>
           <td  valign="top" width="50%">
    
    ### 🎥 <a href="https://www.douban.com/people/sjx270992395/" target="_blank">Douban</a>
    
    <!-- START_SECTION:douban -->
    
    <!-- END_SECTION:douban -->
    </td>
            </tr>
    </tbody>
    </table>
    
    

8 Dev Metrics in Readme

Github 地址:athul/waka-readme

image.png

9 链滴动态

资料:使用 GitHub Actions 对 GitHub Profile 个人主页进行自动更新

image.png

其他参考资料

Github 首页美化教程 | 小孙同学 (sunguoqi.com)

  • GitHub

    GitHub 于 2008 年上线,目前,除了 Git 代码仓库托管及基本的 Web 管理界面以外,还提供了订阅、讨论组、文本渲染、在线文件编辑器、协作图谱(报表)、代码片段分享(Gist)等功能。正因为这些功能所提供的便利,又经过长期的积累,GitHub 的用户活跃度很高,在开源世界里享有深远的声望,并形成了社交化编程文化(Social Coding)。

    209 引用 • 2031 回帖
3 操作
Achuan-2 在 2021-10-04 10:34:55 更新了该帖
Achuan-2 在 2021-10-04 08:05:32 更新了该帖
Achuan-2 在 2021-10-03 23:55:05 更新了该帖

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...