如何给自己的GitHub装扮个性化首页

我的主页

如何配置

  • 需要创建一个仓库,仓库名要跟GitHub的用户名一样,我的已经创建过了
  • 喜欢我的主页可以直接fork然后在自己的仓库修改,如果想自己装扮直接看下一步

地址:github.com/linweiqian

开始装扮

下面展示仓库状态统计的设置,需要把username修改成自己的GitHub名字。通过给url增加参数的形式,可以给svg设置theme,也可以采用默认的(白底);通过layout设置外观布局

仓库状态统计

在您的自述文件中获取动态生成的 GitHub 统计信息 --> 传送门

ini 复制代码
![all-smile's GitHub stats](https://github-readme-stats.vercel.app/api?username=all-smile&show_icons=true&theme=tokyonight)

主页访问量统计

less 复制代码
![Visitor Count](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/4ac595079b3e495c81bbd930d93f5861~tplv-k3u1fbpfcp-zoom-1.image)

常用语言占比统计

在您的自述文件中添加使用编程语言对比统计图 --> 传送门

ini 复制代码
![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=all-smile&layout=compact&theme=tokyonight)

Metrics(GitHub 信息统计)

获得类似上图的 GitHub 数据统计,需要用到一个在线工具「Metrics」,打开网站之后,在左侧输入你的 GitHub ID,稍等一会,就会返回右侧所有和你相关的数据。

xml 复制代码
<div align="center"> <img src="https://metrics.lecoq.io/sun0225SUN?template=classic&config.timezone=Asia%2FShanghai"> </div>

Github Profile Trophy(GitHub 资料奖杯)

添加奖杯信息--> 传送门

xml 复制代码
<div align="center"> <img src="https://github-profile-trophy.vercel.app/?username=sun0225SUN" /> </div>

Shields(GitHub 徽章)

为你的开源项目生成高质量小徽章图标,直接复制链接使用。 --> 传送门

xml 复制代码
<span > <img src="https://img.shields.io/badge/-HTML5-E34F26?style=flat-square&logo=html5&logoColor=white" /> <img src="https://img.shields.io/badge/-CSS3-1572B6?style=flat-square&logo=css3" /> <img src="https://img.shields.io/badge/-JavaScript-oringe?style=flat-square&logo=javascript" /> </span>

Visitor Badge(GitHub 访客徽章)

这个徽章会实时改变,记录此页面被访问的次数。-->传送门

xml 复制代码
<div align="center"> <img src="https://visitor-badge.glitch.me/badge?page_id=linweiqian" /> </div>

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

动态生成的活动图,用于显示您过去 31 天的 GitHub 活动。 --> 传送门

xml 复制代码
<div align="center"> <img src="https://activity-graph.herokuapp.com/graph?username=linweiqian&theme=xcode" /> </div>

GitHub streak(GitHub 连续打卡)

在 README 中展示您连续提交代码的次数。 --> 传送门

xml 复制代码
<div align="center"> <img src="https://github-readme-streak-stats.herokuapp.com/?user=sun0225SUN" /> </div>

社交统计

在 README 中展示你在一些流行的网站的数据。 --> 传送门

xml 复制代码
<div align="center"> <img src="https://stats.justsong.cn/api/csdn?id=weixin_50915462"> </div>

打字特效

循环打字的效果,很炫酷,--> 传送门

css 复制代码
<h1 align="center"> <img src="https://readme-typing-svg.herokuapp.com/?lines=console.log(%22Hello%2C%20World!%22);欢迎来到嚣张农民GitHub首页!&center=true&size=27"></h1>

动态贪吃蛇

首先看配置内容:

css 复制代码
![snake](./assets/github-contribution-grid-snake.svg)

引用了仓库本地的一个svg文件,此文件借助一个GitHub Actinos每天自动生成一次。

yaml 复制代码
name: Generate Snake
on:
  schedule:
    - cron: "0 0 * * *"
  workflow_dispatch:
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: master
          message: "Generate Contribution Snake"

此功能基于如下项目构建:

提交动态折线图

配置内容如下:

ini 复制代码
![](https://activity-graph.herokuapp.com/graph?username=linweiqian&theme=github)

此功能基于如下项目构建:

GitHub Pinned的功能

GitHub Pinned 是一个能够将项目钉在个人主页的功能,效果如下:

但有一个问题,此功能只允许我们添加6个项目钉在这里。

通过如下配置,我们可以将更多自己想要钉住的项目钉在个人主页:

ruby 复制代码
[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=eryajf&repo=ldapctl&show_owner=true&&theme=cobalt)](https://github.com/eryajf/ldapctl)

此功能基于如下项目构建:

自定义模板

profilinator.rishav.dev/

相关推荐
甜兒.25 分钟前
鸿蒙小技巧
前端·华为·typescript·harmonyos
Jiaberrr4 小时前
前端实战:使用JS和Canvas实现运算图形验证码(uniapp、微信小程序同样可用)
前端·javascript·vue.js·微信小程序·uni-app
everyStudy4 小时前
JS中判断字符串中是否包含指定字符
开发语言·前端·javascript
城南云小白4 小时前
web基础+http协议+httpd详细配置
前端·网络协议·http
前端小趴菜、4 小时前
Web Worker 简单使用
前端
web_learning_3214 小时前
信息收集常用指令
前端·搜索引擎
tabzzz4 小时前
Webpack 概念速通:从入门到掌握构建工具的精髓
前端·webpack
200不是二百5 小时前
Vuex详解
前端·javascript·vue.js
滔滔不绝tao5 小时前
自动化测试常用函数
前端·css·html5
码爸5 小时前
flink doris批量sink
java·前端·flink